<html>
<head><meta charset="utf-8"><title>Raz takes on the trig functions and other beasts · project-portable-simd · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/index.html">project-portable-simd</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Raz.20takes.20on.20the.20trig.20functions.20and.20other.20beasts.html">Raz takes on the trig functions and other beasts</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="225626391"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Raz%20takes%20on%20the%20trig%20functions%20and%20other%20beasts/near/225626391" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Miguel Raz Guzmán Macedo <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Raz.20takes.20on.20the.20trig.20functions.20and.20other.20beasts.html#225626391">(Feb 08 2021 at 23:46)</a>:</h4>
<p><span class="user-mention silent" data-user-id="281757">Jubilee</span> <a href="#narrow/stream/257879-project-portable-simd/topic/Using.20multiple.20feature.20gates/near/225121422">said</a>:</p>
<blockquote>
<p><span class="user-mention silent" data-user-id="246783">Miguel Raz Guzmán Macedo</span> You are quite welcome to take a look at implementing the trig functions listed here! <a href="https://github.com/rust-lang/stdsimd/issues/6">https://github.com/rust-lang/stdsimd/issues/6</a></p>
</blockquote>
<p>Posting this for posterity. <a href="https://github.com/vectorclass/version2/blob/master/vectormath_trig.h">https://github.com/vectorclass/version2/blob/master/vectormath_trig.h</a></p>



<a name="225626458"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Raz%20takes%20on%20the%20trig%20functions%20and%20other%20beasts/near/225626458" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Miguel Raz Guzmán Macedo <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Raz.20takes.20on.20the.20trig.20functions.20and.20other.20beasts.html#225626458">(Feb 08 2021 at 23:47)</a>:</h4>
<p>I'm making a new thread so I can continue my onslaught against silly Rust questions.</p>



<a name="225626509"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Raz%20takes%20on%20the%20trig%20functions%20and%20other%20beasts/near/225626509" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Miguel Raz Guzmán Macedo <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Raz.20takes.20on.20the.20trig.20functions.20and.20other.20beasts.html#225626509">(Feb 08 2021 at 23:48)</a>:</h4>
<p>(And post occasional PR updates.)</p>



<a name="225629878"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Raz%20takes%20on%20the%20trig%20functions%20and%20other%20beasts/near/225629878" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Miguel Raz Guzmán Macedo <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Raz.20takes.20on.20the.20trig.20functions.20and.20other.20beasts.html#225629878">(Feb 09 2021 at 00:29)</a>:</h4>
<p>Dear lord Rust just made me type </p>
<div class="codehilite" data-code-language="Rust"><pre><span></span><code><span class="p">(</span><span class="mf">0.5</span><span class="k">f32</span><span class="p">).</span><span class="n">cos</span><span class="p">()</span><span class="w"></span>
</code></pre></div>
<p>and I just died a little x_x</p>



<a name="225630153"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Raz%20takes%20on%20the%20trig%20functions%20and%20other%20beasts/near/225630153" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jubilee <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Raz.20takes.20on.20the.20trig.20functions.20and.20other.20beasts.html#225630153">(Feb 09 2021 at 00:33)</a>:</h4>
<p>ENJOY.</p>



<a name="225630158"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Raz%20takes%20on%20the%20trig%20functions%20and%20other%20beasts/near/225630158" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jubilee <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Raz.20takes.20on.20the.20trig.20functions.20and.20other.20beasts.html#225630158">(Feb 09 2021 at 00:33)</a>:</h4>
<p>yeah it's<br>
yeah.</p>



<a name="225631217"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Raz%20takes%20on%20the%20trig%20functions%20and%20other%20beasts/near/225631217" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Thom Chiovoloni <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Raz.20takes.20on.20the.20trig.20functions.20and.20other.20beasts.html#225631217">(Feb 09 2021 at 00:47)</a>:</h4>
<ol>
<li>Great, I think this will help point out places we're missing support for operations. IMO our library should be complete enough to support this stuff</li>
<li>Note that the vectorclass impls are a good reference point but don't in many cases have the same precision/range as what ieee754 recommends. See <a href="https://www.agner.org/optimize/vcl_manual.pdf">https://www.agner.org/optimize/vcl_manual.pdf</a> which lists various functions and also lists known divergences<p>- Note that subnormals are explicitly not handled by all functions.<br>
  - We won't want to encode error info in the nan payloads the way it does, just return NaN/Inf as required by IEEE</p>
</li>
</ol>



<a name="225641008"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Raz%20takes%20on%20the%20trig%20functions%20and%20other%20beasts/near/225641008" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Miguel Raz Guzmán Macedo <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Raz.20takes.20on.20the.20trig.20functions.20and.20other.20beasts.html#225641008">(Feb 09 2021 at 03:13)</a>:</h4>
<p>Alright. Thanks for the pointers <span class="user-mention" data-user-id="209168">@Thom Chiovoloni</span> and <span class="user-mention" data-user-id="281757">@Jubilee</span> . Imma start a stream - finish an Exercism and then begin with the simplest possible function to write.</p>



<a name="225641016"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Raz%20takes%20on%20the%20trig%20functions%20and%20other%20beasts/near/225641016" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Miguel Raz Guzmán Macedo <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Raz.20takes.20on.20the.20trig.20functions.20and.20other.20beasts.html#225641016">(Feb 09 2021 at 03:14)</a>:</h4>
<p>(Because it's late and lord knows IEEE754 is an early morning read.)</p>



<a name="225641090"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Raz%20takes%20on%20the%20trig%20functions%20and%20other%20beasts/near/225641090" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Thom Chiovoloni <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Raz.20takes.20on.20the.20trig.20functions.20and.20other.20beasts.html#225641090">(Feb 09 2021 at 03:15)</a>:</h4>
<p>I actually thought about doing a few of these a while ago but wasnt 100% certain where it would go, since eventually to support the arches with this builtin we need a <code>simd_sin</code> (or w/e) builtin, but then we need to provide the manual fallback on the ones without it.</p>



<a name="225641459"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Raz%20takes%20on%20the%20trig%20functions%20and%20other%20beasts/near/225641459" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Miguel Raz Guzmán Macedo <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Raz.20takes.20on.20the.20trig.20functions.20and.20other.20beasts.html#225641459">(Feb 09 2021 at 03:22)</a>:</h4>
<p>Gotcha. Starting the stream now...</p>



<a name="225641463"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Raz%20takes%20on%20the%20trig%20functions%20and%20other%20beasts/near/225641463" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Miguel Raz Guzmán Macedo <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Raz.20takes.20on.20the.20trig.20functions.20and.20other.20beasts.html#225641463">(Feb 09 2021 at 03:22)</a>:</h4>
<p><a href="https://meet.jit.si/173738969826348">Click to join video call</a></p>



<a name="225642415"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Raz%20takes%20on%20the%20trig%20functions%20and%20other%20beasts/near/225642415" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Miguel Raz Guzmán Macedo <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Raz.20takes.20on.20the.20trig.20functions.20and.20other.20beasts.html#225642415">(Feb 09 2021 at 03:38)</a>:</h4>
<p><span aria-label="tada" class="emoji emoji-1f389" role="img" title="tada">:tada:</span> exercism vanquished, onto the <code>cos</code> and <code>sin</code>.</p>



<a name="225643458"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Raz%20takes%20on%20the%20trig%20functions%20and%20other%20beasts/near/225643458" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Miguel Raz Guzmán Macedo <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Raz.20takes.20on.20the.20trig.20functions.20and.20other.20beasts.html#225643458">(Feb 09 2021 at 03:58)</a>:</h4>
<p>OK I think I added the appropriate tests in <code>float_macros.rs</code>:</p>
<div class="codehilite" data-code-language="Rust"><pre><span></span><code><span class="w">            </span><span class="cp">#[test]</span><span class="w"></span>
<span class="w">            </span><span class="cp">#[cfg_attr(target_arch = </span><span class="s">"wasm32"</span><span class="cp">, wasm_bindgen_test)]</span><span class="w"></span>
<span class="w">            </span><span class="k">fn</span> <span class="nf">sin</span><span class="p">()</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">                </span><span class="k">for</span><span class="w"> </span><span class="n">v</span><span class="w"> </span><span class="k">in</span><span class="w"> </span><span class="n">slice_chunks</span><span class="p">(</span><span class="o">&amp;</span><span class="n">C</span><span class="p">)</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">                    </span><span class="kd">let</span><span class="w"> </span><span class="n">expected</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">apply_unary_lanewise</span><span class="p">(</span><span class="n">v</span><span class="p">,</span><span class="w"> </span><span class="o">&lt;</span><span class="cp">$scalar</span><span class="o">&gt;</span>::<span class="n">sin</span><span class="p">);</span><span class="w"></span>
<span class="w">                    </span><span class="n">assert_biteq</span><span class="o">!</span><span class="p">(</span><span class="n">v</span><span class="p">.</span><span class="n">sin</span><span class="p">(),</span><span class="w"> </span><span class="n">expected</span><span class="p">);</span><span class="w"></span>
<span class="w">                </span><span class="p">}</span><span class="w"></span>
<span class="w">            </span><span class="p">}</span><span class="w"></span>

<span class="w">            </span><span class="cp">#[test]</span><span class="w"></span>
<span class="w">            </span><span class="cp">#[cfg_attr(target_arch = </span><span class="s">"wasm32"</span><span class="cp">, wasm_bindgen_test)]</span><span class="w"></span>
<span class="w">            </span><span class="k">fn</span> <span class="nf">cos</span><span class="p">()</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">                </span><span class="k">for</span><span class="w"> </span><span class="n">v</span><span class="w"> </span><span class="k">in</span><span class="w"> </span><span class="n">slice_chunks</span><span class="p">(</span><span class="o">&amp;</span><span class="n">C</span><span class="p">)</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">                    </span><span class="kd">let</span><span class="w"> </span><span class="n">expected</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">apply_unary_lanewise</span><span class="p">(</span><span class="n">v</span><span class="p">,</span><span class="w"> </span><span class="o">&lt;</span><span class="cp">$scalar</span><span class="o">&gt;</span>::<span class="n">cos</span><span class="p">);</span><span class="w"></span>
<span class="w">                    </span><span class="n">assert_biteq</span><span class="o">!</span><span class="p">(</span><span class="n">v</span><span class="p">.</span><span class="n">cos</span><span class="p">(),</span><span class="w"> </span><span class="n">expected</span><span class="p">);</span><span class="w"></span>
<span class="w">                </span><span class="p">}</span><span class="w"></span>
<span class="w">            </span><span class="p">}</span><span class="w"></span>
</code></pre></div>



<a name="225644405"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Raz%20takes%20on%20the%20trig%20functions%20and%20other%20beasts/near/225644405" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Miguel Raz Guzmán Macedo <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Raz.20takes.20on.20the.20trig.20functions.20and.20other.20beasts.html#225644405">(Feb 09 2021 at 04:17)</a>:</h4>
<p>A PR draft has been made!<br>
<a href="https://github.com/rust-lang/stdsimd/pull/66">https://github.com/rust-lang/stdsimd/pull/66</a></p>



<a name="225644522"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Raz%20takes%20on%20the%20trig%20functions%20and%20other%20beasts/near/225644522" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Miguel Raz Guzmán Macedo <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Raz.20takes.20on.20the.20trig.20functions.20and.20other.20beasts.html#225644522">(Feb 09 2021 at 04:19)</a>:</h4>
<p>I'm off for the night!</p>



<a name="225647192"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Raz%20takes%20on%20the%20trig%20functions%20and%20other%20beasts/near/225647192" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Miguel Raz Guzmán Macedo <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Raz.20takes.20on.20the.20trig.20functions.20and.20other.20beasts.html#225647192">(Feb 09 2021 at 05:19)</a>:</h4>
<p>... <span class="user-mention" data-user-id="281757">@Jubilee</span> what's the canonical way to run <code>lldb</code> on rust programs? Google is coming up with some hairy answers.</p>
<p>Or do people use another debugger in Rust?</p>



<a name="225647194"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Raz%20takes%20on%20the%20trig%20functions%20and%20other%20beasts/near/225647194" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jubilee <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Raz.20takes.20on.20the.20trig.20functions.20and.20other.20beasts.html#225647194">(Feb 09 2021 at 05:19)</a>:</h4>
<p>uhhh.</p>



<a name="225647195"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Raz%20takes%20on%20the%20trig%20functions%20and%20other%20beasts/near/225647195" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jubilee <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Raz.20takes.20on.20the.20trig.20functions.20and.20other.20beasts.html#225647195">(Feb 09 2021 at 05:19)</a>:</h4>
<p>I wish I knew LOL</p>



<a name="225647198"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Raz%20takes%20on%20the%20trig%20functions%20and%20other%20beasts/near/225647198" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Miguel Raz Guzmán Macedo <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Raz.20takes.20on.20the.20trig.20functions.20and.20other.20beasts.html#225647198">(Feb 09 2021 at 05:19)</a>:</h4>
<p>wuuuuut</p>



<a name="225647199"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Raz%20takes%20on%20the%20trig%20functions%20and%20other%20beasts/near/225647199" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jubilee <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Raz.20takes.20on.20the.20trig.20functions.20and.20other.20beasts.html#225647199">(Feb 09 2021 at 05:19)</a>:</h4>
<p>Hi, I don't actually know how to use a debugger. ^^;</p>



<a name="225647201"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Raz%20takes%20on%20the%20trig%20functions%20and%20other%20beasts/near/225647201" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lokathor <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Raz.20takes.20on.20the.20trig.20functions.20and.20other.20beasts.html#225647201">(Feb 09 2021 at 05:19)</a>:</h4>
<p>however you'd normally use lldb</p>



<a name="225647205"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Raz%20takes%20on%20the%20trig%20functions%20and%20other%20beasts/near/225647205" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lokathor <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Raz.20takes.20on.20the.20trig.20functions.20and.20other.20beasts.html#225647205">(Feb 09 2021 at 05:19)</a>:</h4>
<p>the binary is in target/debug/thing_name</p>



<a name="225647206"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Raz%20takes%20on%20the%20trig%20functions%20and%20other%20beasts/near/225647206" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lokathor <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Raz.20takes.20on.20the.20trig.20functions.20and.20other.20beasts.html#225647206">(Feb 09 2021 at 05:19)</a>:</h4>
<p>generally</p>



<a name="225647249"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Raz%20takes%20on%20the%20trig%20functions%20and%20other%20beasts/near/225647249" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Miguel Raz Guzmán Macedo <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Raz.20takes.20on.20the.20trig.20functions.20and.20other.20beasts.html#225647249">(Feb 09 2021 at 05:20)</a>:</h4>
<p>Ok ok</p>



<a name="225647250"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Raz%20takes%20on%20the%20trig%20functions%20and%20other%20beasts/near/225647250" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lokathor <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Raz.20takes.20on.20the.20trig.20functions.20and.20other.20beasts.html#225647250">(Feb 09 2021 at 05:20)</a>:</h4>
<p>also i'm with jubilee, i am a no-debugger scrub</p>



<a name="225647253"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Raz%20takes%20on%20the%20trig%20functions%20and%20other%20beasts/near/225647253" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lokathor <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Raz.20takes.20on.20the.20trig.20functions.20and.20other.20beasts.html#225647253">(Feb 09 2021 at 05:20)</a>:</h4>
<p>and i ship over 20,000 crate downloads a day!</p>



<a name="225647255"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Raz%20takes%20on%20the%20trig%20functions%20and%20other%20beasts/near/225647255" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lokathor <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Raz.20takes.20on.20the.20trig.20functions.20and.20other.20beasts.html#225647255">(Feb 09 2021 at 05:20)</a>:</h4>
<p>frightening when you think about it</p>



<a name="225647259"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Raz%20takes%20on%20the%20trig%20functions%20and%20other%20beasts/near/225647259" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Miguel Raz Guzmán Macedo <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Raz.20takes.20on.20the.20trig.20functions.20and.20other.20beasts.html#225647259">(Feb 09 2021 at 05:20)</a>:</h4>
<p>Yeah I built a project for this Stanford Rust class and it compiled but parts of it didn't work so I'm not touching it without a debugger.</p>



<a name="225647275"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Raz%20takes%20on%20the%20trig%20functions%20and%20other%20beasts/near/225647275" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Miguel Raz Guzmán Macedo <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Raz.20takes.20on.20the.20trig.20functions.20and.20other.20beasts.html#225647275">(Feb 09 2021 at 05:21)</a>:</h4>
<p>Oh, well maybe <code>rr</code> will convince you to take a look again at debugging - a deterministic debugger!</p>



<a name="225647280"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Raz%20takes%20on%20the%20trig%20functions%20and%20other%20beasts/near/225647280" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Miguel Raz Guzmán Macedo <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Raz.20takes.20on.20the.20trig.20functions.20and.20other.20beasts.html#225647280">(Feb 09 2021 at 05:21)</a>:</h4>
<p><a href="https://rr-project.org/">https://rr-project.org/</a></p>



<a name="225647338"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Raz%20takes%20on%20the%20trig%20functions%20and%20other%20beasts/near/225647338" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lokathor <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Raz.20takes.20on.20the.20trig.20functions.20and.20other.20beasts.html#225647338">(Feb 09 2021 at 05:22)</a>:</h4>
<p>your statement implies that i ever knew how to use a debugger.</p>



<a name="225647342"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Raz%20takes%20on%20the%20trig%20functions%20and%20other%20beasts/near/225647342" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Miguel Raz Guzmán Macedo <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Raz.20takes.20on.20the.20trig.20functions.20and.20other.20beasts.html#225647342">(Feb 09 2021 at 05:22)</a>:</h4>
<p>Damn, I was hoping the RustGang would have a really nice colorful debugger with some emoji printfs and stuff.</p>



<a name="225647344"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Raz%20takes%20on%20the%20trig%20functions%20and%20other%20beasts/near/225647344" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lokathor <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Raz.20takes.20on.20the.20trig.20functions.20and.20other.20beasts.html#225647344">(Feb 09 2021 at 05:22)</a>:</h4>
<p>15 Years An Idiot: the Rustacean story</p>



<a name="225647358"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Raz%20takes%20on%20the%20trig%20functions%20and%20other%20beasts/near/225647358" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lokathor <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Raz.20takes.20on.20the.20trig.20functions.20and.20other.20beasts.html#225647358">(Feb 09 2021 at 05:23)</a>:</h4>
<p>coming soon to a theater near you</p>



<a name="225647371"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Raz%20takes%20on%20the%20trig%20functions%20and%20other%20beasts/near/225647371" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Caleb Zulawski <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Raz.20takes.20on.20the.20trig.20functions.20and.20other.20beasts.html#225647371">(Feb 09 2021 at 05:23)</a>:</h4>
<p>I use gdb extensively with C++, but I've never really used it with rust</p>



<a name="225647422"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Raz%20takes%20on%20the%20trig%20functions%20and%20other%20beasts/near/225647422" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Caleb Zulawski <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Raz.20takes.20on.20the.20trig.20functions.20and.20other.20beasts.html#225647422">(Feb 09 2021 at 05:24)</a>:</h4>
<p>I think the combination of good incremental build + the Debug trait makes it a lot less necessary</p>



<a name="225647431"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Raz%20takes%20on%20the%20trig%20functions%20and%20other%20beasts/near/225647431" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Miguel Raz Guzmán Macedo <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Raz.20takes.20on.20the.20trig.20functions.20and.20other.20beasts.html#225647431">(Feb 09 2021 at 05:25)</a>:</h4>
<p>I take it people also rejoice in sprinkling the <code>prinln!</code>s to debug?</p>



<a name="225647439"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Raz%20takes%20on%20the%20trig%20functions%20and%20other%20beasts/near/225647439" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Caleb Zulawski <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Raz.20takes.20on.20the.20trig.20functions.20and.20other.20beasts.html#225647439">(Feb 09 2021 at 05:25)</a>:</h4>
<p>it "works" :)</p>



<a name="225647455"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Raz%20takes%20on%20the%20trig%20functions%20and%20other%20beasts/near/225647455" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Miguel Raz Guzmán Macedo <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Raz.20takes.20on.20the.20trig.20functions.20and.20other.20beasts.html#225647455">(Feb 09 2021 at 05:25)</a>:</h4>
<p>Can't be too bad if it works.</p>



<a name="225647460"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Raz%20takes%20on%20the%20trig%20functions%20and%20other%20beasts/near/225647460" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lokathor <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Raz.20takes.20on.20the.20trig.20functions.20and.20other.20beasts.html#225647460">(Feb 09 2021 at 05:25)</a>:</h4>
<p>most stuff i build can be fixed with <code>cargo watch</code> that either runs printing to stdout (which i redirect into a file as a cheapo logger thingy) or runs the test suite</p>



<a name="225647518"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Raz%20takes%20on%20the%20trig%20functions%20and%20other%20beasts/near/225647518" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lokathor <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Raz.20takes.20on.20the.20trig.20functions.20and.20other.20beasts.html#225647518">(Feb 09 2021 at 05:26)</a>:</h4>
<p>I've seriously rebuilt my entire GL bindings generation this week with just <code>cargo watch -c -x "run gl-2010-02-03.xml &gt;target/stdout.txt"</code></p>



<a name="225647549"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Raz%20takes%20on%20the%20trig%20functions%20and%20other%20beasts/near/225647549" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jubilee <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Raz.20takes.20on.20the.20trig.20functions.20and.20other.20beasts.html#225647549">(Feb 09 2021 at 05:27)</a>:</h4>
<p>yeah  it's kind of funny, but all the other tools like <a href="http://tracing.rs">tracing.rs</a>, flamegraphs, etc. are stuff I know how to use.</p>



<a name="225647552"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Raz%20takes%20on%20the%20trig%20functions%20and%20other%20beasts/near/225647552" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Miguel Raz Guzmán Macedo <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Raz.20takes.20on.20the.20trig.20functions.20and.20other.20beasts.html#225647552">(Feb 09 2021 at 05:27)</a>:</h4>
<p><code>cargo watch</code>? brb...</p>



<a name="225647557"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Raz%20takes%20on%20the%20trig%20functions%20and%20other%20beasts/near/225647557" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jubilee <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Raz.20takes.20on.20the.20trig.20functions.20and.20other.20beasts.html#225647557">(Feb 09 2021 at 05:27)</a>:</h4>
<p><code>perf</code>, too.</p>



<a name="225647596"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Raz%20takes%20on%20the%20trig%20functions%20and%20other%20beasts/near/225647596" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Caleb Zulawski <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Raz.20takes.20on.20the.20trig.20functions.20and.20other.20beasts.html#225647596">(Feb 09 2021 at 05:28)</a>:</h4>
<p>alternatively, the trickiest stuff I've had to debug is async and the debugger doesn't do very well with that anyway</p>



<a name="225647599"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Raz%20takes%20on%20the%20trig%20functions%20and%20other%20beasts/near/225647599" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lokathor <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Raz.20takes.20on.20the.20trig.20functions.20and.20other.20beasts.html#225647599">(Feb 09 2021 at 05:28)</a>:</h4>
<p><code>cargo install cargo-watch</code> to get it, it's not a builtin command</p>



<a name="225647601"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Raz%20takes%20on%20the%20trig%20functions%20and%20other%20beasts/near/225647601" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Caleb Zulawski <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Raz.20takes.20on.20the.20trig.20functions.20and.20other.20beasts.html#225647601">(Feb 09 2021 at 05:28)</a>:</h4>
<p>+1 to perf, I use that a ton</p>



<a name="225647602"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Raz%20takes%20on%20the%20trig%20functions%20and%20other%20beasts/near/225647602" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Miguel Raz Guzmán Macedo <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Raz.20takes.20on.20the.20trig.20functions.20and.20other.20beasts.html#225647602">(Feb 09 2021 at 05:28)</a>:</h4>
<p>God it takes ages to setup a benchmark in Rust for me still :/</p>



<a name="225647620"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Raz%20takes%20on%20the%20trig%20functions%20and%20other%20beasts/near/225647620" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jubilee <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Raz.20takes.20on.20the.20trig.20functions.20and.20other.20beasts.html#225647620">(Feb 09 2021 at 05:28)</a>:</h4>
<p>what do you use to bench</p>



<a name="225647638"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Raz%20takes%20on%20the%20trig%20functions%20and%20other%20beasts/near/225647638" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Miguel Raz Guzmán Macedo <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Raz.20takes.20on.20the.20trig.20functions.20and.20other.20beasts.html#225647638">(Feb 09 2021 at 05:29)</a>:</h4>
<p>I just tried out hyperfine, but I haven't used a bench harness in Rust yet.</p>



<a name="225647654"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Raz%20takes%20on%20the%20trig%20functions%20and%20other%20beasts/near/225647654" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Miguel Raz Guzmán Macedo <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Raz.20takes.20on.20the.20trig.20functions.20and.20other.20beasts.html#225647654">(Feb 09 2021 at 05:29)</a>:</h4>
<p>In Julia it's a trivial <code>@benchmark foo(3.0)</code> in the REPL and you get all the statistics for your function.</p>



<a name="225647705"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Raz%20takes%20on%20the%20trig%20functions%20and%20other%20beasts/near/225647705" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Miguel Raz Guzmán Macedo <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Raz.20takes.20on.20the.20trig.20functions.20and.20other.20beasts.html#225647705">(Feb 09 2021 at 05:30)</a>:</h4>
<p>Also thanks for all y'alls tips, I keep starring the comments and I'm slowly building a library of Rust tricks <span aria-label="+1" class="emoji emoji-1f44d" role="img" title="+1">:+1:</span></p>



<a name="225647805"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Raz%20takes%20on%20the%20trig%20functions%20and%20other%20beasts/near/225647805" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jubilee <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Raz.20takes.20on.20the.20trig.20functions.20and.20other.20beasts.html#225647805">(Feb 09 2021 at 05:33)</a>:</h4>
<p>Julia seems to be a very well-designed technology that, by focusing on a particular set of use cases very tightly, has gotten a lot of powerful tooling around that. Rust, otoh, is more of the "you can bench if you want to, you can leave your friends behind" attitude.</p>
<p>I generally just use the nightly <code>cargo bench</code> thing, unless I know I need something more complex. <a href="https://doc.rust-lang.org/cargo/commands/cargo-bench.html">https://doc.rust-lang.org/cargo/commands/cargo-bench.html</a></p>



<a name="225647832"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Raz%20takes%20on%20the%20trig%20functions%20and%20other%20beasts/near/225647832" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lokathor <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Raz.20takes.20on.20the.20trig.20functions.20and.20other.20beasts.html#225647832">(Feb 09 2021 at 05:33)</a>:</h4>
<p>the difficulty with benchmarks in rust is that there's a "built in" benchmarker in Nightly, but it's not as good as the advanced benchmarkers you can get from crates</p>



<a name="225647908"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Raz%20takes%20on%20the%20trig%20functions%20and%20other%20beasts/near/225647908" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Miguel Raz Guzmán Macedo <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Raz.20takes.20on.20the.20trig.20functions.20and.20other.20beasts.html#225647908">(Feb 09 2021 at 05:35)</a>:</h4>
<p>Yeah Julia went full in on interactive technical computing. I think it might pick up steam for a more general audience but it's pretty solid. </p>
<p>Oh nice <span aria-label="musical score" class="emoji emoji-1f3bc" role="img" title="musical score">:musical_score:</span> !</p>



<a name="225647982"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Raz%20takes%20on%20the%20trig%20functions%20and%20other%20beasts/near/225647982" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jubilee <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Raz.20takes.20on.20the.20trig.20functions.20and.20other.20beasts.html#225647982">(Feb 09 2021 at 05:37)</a>:</h4>
<p>yeah, criterion or hyperfine or w/e are better, unfortunately.</p>



<a name="225648032"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Raz%20takes%20on%20the%20trig%20functions%20and%20other%20beasts/near/225648032" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lokathor <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Raz.20takes.20on.20the.20trig.20functions.20and.20other.20beasts.html#225648032">(Feb 09 2021 at 05:38)</a>:</h4>
<p>sadly, the perfect has been the enemy of the good for builtin benchmarking</p>



<a name="225648048"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Raz%20takes%20on%20the%20trig%20functions%20and%20other%20beasts/near/225648048" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jubilee <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Raz.20takes.20on.20the.20trig.20functions.20and.20other.20beasts.html#225648048">(Feb 09 2021 at 05:38)</a>:</h4>
<p>alas.</p>



<a name="225648219"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Raz%20takes%20on%20the%20trig%20functions%20and%20other%20beasts/near/225648219" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Miguel Raz Guzmán Macedo <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Raz.20takes.20on.20the.20trig.20functions.20and.20other.20beasts.html#225648219">(Feb 09 2021 at 05:42)</a>:</h4>
<p>Well, fun is cancelled anyways because arch is mad at me and I keep getting this:</p>
<div class="codehilite" data-code-language="Bash"><pre><span></span><code><span class="o">[</span>I<span class="o">]</span> mrg@JuliaLap ~/p/r/c/w/part-1-hello-world <span class="o">(</span>main<span class="o">)</span> <span class="o">[</span><span class="m">127</span><span class="o">]</span>&gt; rust-lldb
lldb: error <span class="k">while</span> loading shared libraries: liblldb.so.13git: cannot open shared object file: No such file or directory
lldb: error <span class="k">while</span> loading shared libraries: liblldb.so.13git: cannot open shared object file: No such file or directory
<span class="o">[</span>I<span class="o">]</span> mrg@JuliaLap ~/p/r/c/w/part-1-hello-world <span class="o">(</span>main<span class="o">)</span> <span class="o">[</span><span class="m">127</span><span class="o">]</span>&gt; lldb-server
lldb-server: error <span class="k">while</span> loading shared libraries: libclang-cpp.so.11: cannot open shared object file: No such file or directory
</code></pre></div>



<a name="225648232"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Raz%20takes%20on%20the%20trig%20functions%20and%20other%20beasts/near/225648232" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Miguel Raz Guzmán Macedo <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Raz.20takes.20on.20the.20trig.20functions.20and.20other.20beasts.html#225648232">(Feb 09 2021 at 05:42)</a>:</h4>
<p>Even though I did a full LLVM build over the weekend.</p>



<a name="225648297"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Raz%20takes%20on%20the%20trig%20functions%20and%20other%20beasts/near/225648297" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Miguel Raz Guzmán Macedo <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Raz.20takes.20on.20the.20trig.20functions.20and.20other.20beasts.html#225648297">(Feb 09 2021 at 05:44)</a>:</h4>
<p>I think I found the culprit:</p>
<div class="codehilite" data-code-language="Bash"><pre><span></span><code><span class="o">[</span>I<span class="o">]</span> mrg@JuliaLap ~/.c/bin <span class="o">[</span><span class="m">127</span><span class="o">]</span>&gt; ./rust-gdb
gdb: error <span class="k">while</span> loading shared libraries: libpython3.9.so.1.0: cannot open shared object file: No such file or directory
</code></pre></div>



<a name="225648394"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Raz%20takes%20on%20the%20trig%20functions%20and%20other%20beasts/near/225648394" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lokathor <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Raz.20takes.20on.20the.20trig.20functions.20and.20other.20beasts.html#225648394">(Feb 09 2021 at 05:47)</a>:</h4>
<p>i thought you could use the system's gdb</p>



<a name="225648550"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Raz%20takes%20on%20the%20trig%20functions%20and%20other%20beasts/near/225648550" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Miguel Raz Guzmán Macedo <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Raz.20takes.20on.20the.20trig.20functions.20and.20other.20beasts.html#225648550">(Feb 09 2021 at 05:50)</a>:</h4>
<p><span aria-label="clown" class="emoji emoji-1f921" role="img" title="clown">:clown:</span> &lt;---- me</p>



<a name="225648568"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Raz%20takes%20on%20the%20trig%20functions%20and%20other%20beasts/near/225648568" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Miguel Raz Guzmán Macedo <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Raz.20takes.20on.20the.20trig.20functions.20and.20other.20beasts.html#225648568">(Feb 09 2021 at 05:51)</a>:</h4>
<p>fresh install from the <code>sudo pacman -Sy gdb</code> yields:</p>
<div class="codehilite" data-code-language="Bash"><pre><span></span><code><span class="o">[</span>I<span class="o">]</span> mrg@JuliaLap ~/.c/bin <span class="o">[</span><span class="m">127</span><span class="o">]</span>&gt; gdb
gdb: error <span class="k">while</span> loading shared libraries: libpython3.9.so.1.0: cannot open shared object file: No such file or directory
</code></pre></div>



<a name="225648570"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Raz%20takes%20on%20the%20trig%20functions%20and%20other%20beasts/near/225648570" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lokathor <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Raz.20takes.20on.20the.20trig.20functions.20and.20other.20beasts.html#225648570">(Feb 09 2021 at 05:51)</a>:</h4>
<p>big oops</p>



<a name="225648575"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Raz%20takes%20on%20the%20trig%20functions%20and%20other%20beasts/near/225648575" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jubilee <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Raz.20takes.20on.20the.20trig.20functions.20and.20other.20beasts.html#225648575">(Feb 09 2021 at 05:51)</a>:</h4>
<p>well</p>



<a name="225648620"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Raz%20takes%20on%20the%20trig%20functions%20and%20other%20beasts/near/225648620" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Miguel Raz Guzmán Macedo <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Raz.20takes.20on.20the.20trig.20functions.20and.20other.20beasts.html#225648620">(Feb 09 2021 at 05:52)</a>:</h4>
<p>I am just going to blame the python package manager and keep going with my day.</p>



<a name="225648622"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Raz%20takes%20on%20the%20trig%20functions%20and%20other%20beasts/near/225648622" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jubilee <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Raz.20takes.20on.20the.20trig.20functions.20and.20other.20beasts.html#225648622">(Feb 09 2021 at 05:52)</a>:</h4>
<p>I wonder how <a href="https://headcrab.rs/">https://headcrab.rs/</a> is coming along.</p>



<a name="225648629"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Raz%20takes%20on%20the%20trig%20functions%20and%20other%20beasts/near/225648629" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Miguel Raz Guzmán Macedo <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Raz.20takes.20on.20the.20trig.20functions.20and.20other.20beasts.html#225648629">(Feb 09 2021 at 05:52)</a>:</h4>
<p>I saw it posted today but couldn't get it to install.</p>



<a name="225648641"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Raz%20takes%20on%20the%20trig%20functions%20and%20other%20beasts/near/225648641" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lokathor <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Raz.20takes.20on.20the.20trig.20functions.20and.20other.20beasts.html#225648641">(Feb 09 2021 at 05:52)</a>:</h4>
<blockquote>
<p>cross-platform: x86_64 for Linux &amp; macOS</p>
</blockquote>
<p><em>[screaming externally]</em></p>



<a name="225648652"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Raz%20takes%20on%20the%20trig%20functions%20and%20other%20beasts/near/225648652" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Miguel Raz Guzmán Macedo <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Raz.20takes.20on.20the.20trig.20functions.20and.20other.20beasts.html#225648652">(Feb 09 2021 at 05:53)</a>:</h4>
<p>^ why is that?</p>



<a name="225648671"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Raz%20takes%20on%20the%20trig%20functions%20and%20other%20beasts/near/225648671" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jubilee <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Raz.20takes.20on.20the.20trig.20functions.20and.20other.20beasts.html#225648671">(Feb 09 2021 at 05:53)</a>:</h4>
<p>lul x86_64 for MacOS</p>



<a name="225648672"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Raz%20takes%20on%20the%20trig%20functions%20and%20other%20beasts/near/225648672" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lokathor <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Raz.20takes.20on.20the.20trig.20functions.20and.20other.20beasts.html#225648672">(Feb 09 2021 at 05:53)</a>:</h4>
<p>Any time that a project doesn't list Windows support first I just assume it's going to be accidental at best.</p>



<a name="225648764"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Raz%20takes%20on%20the%20trig%20functions%20and%20other%20beasts/near/225648764" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Miguel Raz Guzmán Macedo <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Raz.20takes.20on.20the.20trig.20functions.20and.20other.20beasts.html#225648764">(Feb 09 2021 at 05:55)</a>:</h4>
<p>oh wait - x86_64 is the one that can use 32 bit and 64 bit archs right?</p>



<a name="225648776"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Raz%20takes%20on%20the%20trig%20functions%20and%20other%20beasts/near/225648776" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lokathor <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Raz.20takes.20on.20the.20trig.20functions.20and.20other.20beasts.html#225648776">(Feb 09 2021 at 05:55)</a>:</h4>
<p>yes, x86_64 chips can execute x86 code</p>



<a name="225649181"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Raz%20takes%20on%20the%20trig%20functions%20and%20other%20beasts/near/225649181" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Miguel Raz Guzmán Macedo <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Raz.20takes.20on.20the.20trig.20functions.20and.20other.20beasts.html#225649181">(Feb 09 2021 at 06:03)</a>:</h4>
<p>Alright, bedtime, for realsies. Thanks people!</p>



<a name="225657509"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Raz%20takes%20on%20the%20trig%20functions%20and%20other%20beasts/near/225657509" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> bjorn3 <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Raz.20takes.20on.20the.20trig.20functions.20and.20other.20beasts.html#225657509">(Feb 09 2021 at 08:34)</a>:</h4>
<p><span class="user-mention silent" data-user-id="281757">Jubilee</span> <a href="#narrow/stream/257879-project-portable-simd/topic/Raz.20takes.20on.20the.20trig.20functions.20and.20other.20beasts/near/225648622">said</a>:</p>
<blockquote>
<p>I wonder how <a href="https://headcrab.rs/">https://headcrab.rs/</a> is coming along.</p>
</blockquote>
<p>There was a post just today:<br>
<a href="https://headcrab.zulipchat.com/#narrow/stream/248039-general/topic/still.20active.3F/near/225623269">https://headcrab.zulipchat.com/#narrow/stream/248039-general/topic/still.20active.3F/near/225623269</a><br>
<span class="user-mention silent" data-user-id="210946">Nikita Baksalyar</span></p>
<blockquote>
<p>[...]</p>
<p>A more elaborate answer: lately I haven't been able to find much spare time as I would like to work on open source, but the design/architecture/planning phase is active. I'm sorry for a lack of updates and uncertainty - that's my fault. With regards to funding and OpenCollective contributions: the funds are not being used at this time, and I'm happy to do refunds. That said, all unused funds eventually will be directed towards further development (for issue bounties, contributor rewards, infrastructure, etc.).</p>
<p>The thing I'm working on right now is a development plan for 2021: I believe the focus should be on making Headcrab a practical, usable toolkit first and foremost - I see multiple simple use cases where it can provide value. The actual coding might take a bit of time, but abandoning this project was never an intent - personally, I see it as a long-term one. :)</p>
</blockquote>



<a name="225687591"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Raz%20takes%20on%20the%20trig%20functions%20and%20other%20beasts/near/225687591" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jubilee <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Raz.20takes.20on.20the.20trig.20functions.20and.20other.20beasts.html#225687591">(Feb 09 2021 at 13:18)</a>:</h4>
<p>tfw</p>



<a name="225707811"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Raz%20takes%20on%20the%20trig%20functions%20and%20other%20beasts/near/225707811" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oliver <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Raz.20takes.20on.20the.20trig.20functions.20and.20other.20beasts.html#225707811">(Feb 09 2021 at 15:37)</a>:</h4>
<p>here's some stuff on cross platform: <a href="https://fosdem.org/2021/schedule/event/a_journey_to_performance/">https://fosdem.org/2021/schedule/event/a_journey_to_performance/</a></p>



<a name="225722117"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Raz%20takes%20on%20the%20trig%20functions%20and%20other%20beasts/near/225722117" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Thom Chiovoloni <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Raz.20takes.20on.20the.20trig.20functions.20and.20other.20beasts.html#225722117">(Feb 09 2021 at 17:05)</a>:</h4>
<p>If you need to debug rust, I recommend using the VSCode-LLDB plugin, which basically can set itself up on rust projects and works quite well (with the caveat that I've had absolutely no luck figuring out what's going wrong when it fails to work beyond generally uninstall+reinstall fixing it)</p>
<p>Probably doesn't work on Windows (although I think it claims to so YMMV) and has an actual UI.</p>



<a name="225722382"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Raz%20takes%20on%20the%20trig%20functions%20and%20other%20beasts/near/225722382" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Miguel Raz Guzmán Macedo <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Raz.20takes.20on.20the.20trig.20functions.20and.20other.20beasts.html#225722382">(Feb 09 2021 at 17:06)</a>:</h4>
<p>Thanks Thom, I'll look into that.</p>



<a name="225743997"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Raz%20takes%20on%20the%20trig%20functions%20and%20other%20beasts/near/225743997" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oliver <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Raz.20takes.20on.20the.20trig.20functions.20and.20other.20beasts.html#225743997">(Feb 09 2021 at 19:29)</a>:</h4>
<p>here's what Rust debugging in Code would look like for reference: <br>
<a href="/user_uploads/4715/IixG2zcwRRBQTd5Aoy7KJgGI/image.png">image.png</a></p>
<div class="message_inline_image"><a href="/user_uploads/4715/IixG2zcwRRBQTd5Aoy7KJgGI/image.png" title="image.png"><img src="/user_uploads/4715/IixG2zcwRRBQTd5Aoy7KJgGI/image.png"></a></div>



<a name="225764500"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Raz%20takes%20on%20the%20trig%20functions%20and%20other%20beasts/near/225764500" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Miguel Raz Guzmán Macedo <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Raz.20takes.20on.20the.20trig.20functions.20and.20other.20beasts.html#225764500">(Feb 09 2021 at 22:01)</a>:</h4>
<p>Oh sweet <span class="user-mention" data-user-id="281739">@oliver</span> , defs will check it out in a sec.</p>



<a name="225765487"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Raz%20takes%20on%20the%20trig%20functions%20and%20other%20beasts/near/225765487" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Miguel Raz Guzmán Macedo <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Raz.20takes.20on.20the.20trig.20functions.20and.20other.20beasts.html#225765487">(Feb 09 2021 at 22:10)</a>:</h4>
<p>OK I installed the VSCode plugin "CodeLLDB" v1.6.1.<br>
How do I fire it up on a hello world script?</p>



<a name="225766051"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Raz%20takes%20on%20the%20trig%20functions%20and%20other%20beasts/near/225766051" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Miguel Raz Guzmán Macedo <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Raz.20takes.20on.20the.20trig.20functions.20and.20other.20beasts.html#225766051">(Feb 09 2021 at 22:15)</a>:</h4>
<p>Answering my own question: <code>Alt+Shift+D</code> will get you a pop up profile and you can start from there.</p>



<a name="225767151"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Raz%20takes%20on%20the%20trig%20functions%20and%20other%20beasts/near/225767151" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Miguel Raz Guzmán Macedo <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Raz.20takes.20on.20the.20trig.20functions.20and.20other.20beasts.html#225767151">(Feb 09 2021 at 22:25)</a>:</h4>
<p>X_X I need to write a JSON file for every crate? :/</p>



<a name="225767664"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Raz%20takes%20on%20the%20trig%20functions%20and%20other%20beasts/near/225767664" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jubilee <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Raz.20takes.20on.20the.20trig.20functions.20and.20other.20beasts.html#225767664">(Feb 09 2021 at 22:30)</a>:</h4>
<p>what, a JSON file for every crate?</p>



<a name="225768129"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Raz%20takes%20on%20the%20trig%20functions%20and%20other%20beasts/near/225768129" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Miguel Raz Guzmán Macedo <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Raz.20takes.20on.20the.20trig.20functions.20and.20other.20beasts.html#225768129">(Feb 09 2021 at 22:35)</a>:</h4>
<blockquote>
<p>You'll have to manually change the executable name under "program".</p>
</blockquote>



<a name="225768149"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Raz%20takes%20on%20the%20trig%20functions%20and%20other%20beasts/near/225768149" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Miguel Raz Guzmán Macedo <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Raz.20takes.20on.20the.20trig.20functions.20and.20other.20beasts.html#225768149">(Feb 09 2021 at 22:35)</a>:</h4>
<p><a href="https://www.forrestthewoods.com/blog/how-to-debug-rust-with-visual-studio-code/">https://www.forrestthewoods.com/blog/how-to-debug-rust-with-visual-studio-code/</a></p>



<a name="225768166"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Raz%20takes%20on%20the%20trig%20functions%20and%20other%20beasts/near/225768166" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Miguel Raz Guzmán Macedo <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Raz.20takes.20on.20the.20trig.20functions.20and.20other.20beasts.html#225768166">(Feb 09 2021 at 22:35)</a>:</h4>
<p>But hey! It's working now!</p>



<a name="225768357"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Raz%20takes%20on%20the%20trig%20functions%20and%20other%20beasts/near/225768357" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oliver <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Raz.20takes.20on.20the.20trig.20functions.20and.20other.20beasts.html#225768357">(Feb 09 2021 at 22:37)</a>:</h4>
<p>that was a screenshot from the extension homepage, I use Vim <span aria-label="joy" class="emoji emoji-1f602" role="img" title="joy">:joy:</span></p>



<a name="225768402"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Raz%20takes%20on%20the%20trig%20functions%20and%20other%20beasts/near/225768402" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oliver <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Raz.20takes.20on.20the.20trig.20functions.20and.20other.20beasts.html#225768402">(Feb 09 2021 at 22:37)</a>:</h4>
<p>I thought it was neat they had a nice Rust example</p>



<a name="225768461"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Raz%20takes%20on%20the%20trig%20functions%20and%20other%20beasts/near/225768461" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Caleb Zulawski <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Raz.20takes.20on.20the.20trig.20functions.20and.20other.20beasts.html#225768461">(Feb 09 2021 at 22:38)</a>:</h4>
<p>Do you use any rust integration with vim?</p>



<a name="225768468"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Raz%20takes%20on%20the%20trig%20functions%20and%20other%20beasts/near/225768468" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Caleb Zulawski <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Raz.20takes.20on.20the.20trig.20functions.20and.20other.20beasts.html#225768468">(Feb 09 2021 at 22:38)</a>:</h4>
<p>I use vim but haven't set any up</p>



<a name="225768496"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Raz%20takes%20on%20the%20trig%20functions%20and%20other%20beasts/near/225768496" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oliver <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Raz.20takes.20on.20the.20trig.20functions.20and.20other.20beasts.html#225768496">(Feb 09 2021 at 22:38)</a>:</h4>
<p>yeah I have quite a bit of configuration</p>



<a name="225768548"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Raz%20takes%20on%20the%20trig%20functions%20and%20other%20beasts/near/225768548" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Miguel Raz Guzmán Macedo <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Raz.20takes.20on.20the.20trig.20functions.20and.20other.20beasts.html#225768548">(Feb 09 2021 at 22:39)</a>:</h4>
<p>Oh My, you can see the vectorized register! <span class="user-mention" data-user-id="281757">@Jubilee</span></p>



<a name="225768622"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Raz%20takes%20on%20the%20trig%20functions%20and%20other%20beasts/near/225768622" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Miguel Raz Guzmán Macedo <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Raz.20takes.20on.20the.20trig.20functions.20and.20other.20beasts.html#225768622">(Feb 09 2021 at 22:40)</a>:</h4>
<div class="message_inline_image"><a href="https://imgur.com/wfUj7KC.png"><img src="https://imgur.com/wfUj7KC.png"></a></div>



<a name="225768630"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Raz%20takes%20on%20the%20trig%20functions%20and%20other%20beasts/near/225768630" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Miguel Raz Guzmán Macedo <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Raz.20takes.20on.20the.20trig.20functions.20and.20other.20beasts.html#225768630">(Feb 09 2021 at 22:40)</a>:</h4>
<p>&lt; on the left</p>



<a name="225768657"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Raz%20takes%20on%20the%20trig%20functions%20and%20other%20beasts/near/225768657" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jubilee <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Raz.20takes.20on.20the.20trig.20functions.20and.20other.20beasts.html#225768657">(Feb 09 2021 at 22:40)</a>:</h4>
<p>neat.</p>



<a name="225768670"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Raz%20takes%20on%20the%20trig%20functions%20and%20other%20beasts/near/225768670" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oliver <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Raz.20takes.20on.20the.20trig.20functions.20and.20other.20beasts.html#225768670">(Feb 09 2021 at 22:41)</a>:</h4>
<p>is that different from hexdump?</p>



<a name="225768687"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Raz%20takes%20on%20the%20trig%20functions%20and%20other%20beasts/near/225768687" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Miguel Raz Guzmán Macedo <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Raz.20takes.20on.20the.20trig.20functions.20and.20other.20beasts.html#225768687">(Feb 09 2021 at 22:41)</a>:</h4>
<p>no idea Oliver.</p>



<a name="225768701"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Raz%20takes%20on%20the%20trig%20functions%20and%20other%20beasts/near/225768701" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Miguel Raz Guzmán Macedo <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Raz.20takes.20on.20the.20trig.20functions.20and.20other.20beasts.html#225768701">(Feb 09 2021 at 22:41)</a>:</h4>
<p>I just set a breakpoint in this program and started the debugger.</p>



<a name="225768726"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Raz%20takes%20on%20the%20trig%20functions%20and%20other%20beasts/near/225768726" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Miguel Raz Guzmán Macedo <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Raz.20takes.20on.20the.20trig.20functions.20and.20other.20beasts.html#225768726">(Feb 09 2021 at 22:41)</a>:</h4>
<p>I need some care to pass the args to the program :/</p>



<a name="225769053"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Raz%20takes%20on%20the%20trig%20functions%20and%20other%20beasts/near/225769053" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oliver <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Raz.20takes.20on.20the.20trig.20functions.20and.20other.20beasts.html#225769053">(Feb 09 2021 at 22:44)</a>:</h4>
<p><span class="user-mention silent" data-user-id="281739">oliver</span> <a href="#narrow/stream/257879-project-portable-simd/topic/Raz.20takes.20on.20the.20trig.20functions.20and.20other.20beasts/near/225768670">said</a>:</p>
<blockquote>
<p>is that different from hexdump?</p>
</blockquote>
<p><a href="/user_uploads/4715/-wJc8YblVw3fFv46v0V_01UH/image.png">image.png</a>  I guess so</p>
<div class="message_inline_image"><a href="/user_uploads/4715/-wJc8YblVw3fFv46v0V_01UH/image.png" title="image.png"><img src="/user_uploads/4715/-wJc8YblVw3fFv46v0V_01UH/image.png"></a></div>



<a name="225769109"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Raz%20takes%20on%20the%20trig%20functions%20and%20other%20beasts/near/225769109" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Miguel Raz Guzmán Macedo <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Raz.20takes.20on.20the.20trig.20functions.20and.20other.20beasts.html#225769109">(Feb 09 2021 at 22:45)</a>:</h4>
<p>^ those are just my printlns from trying to debug the program initially. They're printing to terminal.</p>



<a name="225769236"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Raz%20takes%20on%20the%20trig%20functions%20and%20other%20beasts/near/225769236" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oliver <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Raz.20takes.20on.20the.20trig.20functions.20and.20other.20beasts.html#225769236">(Feb 09 2021 at 22:46)</a>:</h4>
<p>but you ran the program with the break point and it presents memory information there?</p>



<a name="225769261"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Raz%20takes%20on%20the%20trig%20functions%20and%20other%20beasts/near/225769261" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oliver <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Raz.20takes.20on.20the.20trig.20functions.20and.20other.20beasts.html#225769261">(Feb 09 2021 at 22:46)</a>:</h4>
<p>or it updates its static representation as you code?</p>



<a name="225769279"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Raz%20takes%20on%20the%20trig%20functions%20and%20other%20beasts/near/225769279" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Miguel Raz Guzmán Macedo <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Raz.20takes.20on.20the.20trig.20functions.20and.20other.20beasts.html#225769279">(Feb 09 2021 at 22:46)</a>:</h4>
<p>Yeah, clicked on the left panel. All the variables have their values updated as you step through.</p>



<a name="225770895"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Raz%20takes%20on%20the%20trig%20functions%20and%20other%20beasts/near/225770895" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Miguel Raz Guzmán Macedo <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Raz.20takes.20on.20the.20trig.20functions.20and.20other.20beasts.html#225770895">(Feb 09 2021 at 23:04)</a>:</h4>
<p>OK this is still a bit rougher than I expected</p>



<a name="225771323"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Raz%20takes%20on%20the%20trig%20functions%20and%20other%20beasts/near/225771323" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Mario Carneiro <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Raz.20takes.20on.20the.20trig.20functions.20and.20other.20beasts.html#225771323">(Feb 09 2021 at 23:09)</a>:</h4>
<p>vscode's debugger still leaves a lot to be desired</p>



<a name="225777320"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Raz%20takes%20on%20the%20trig%20functions%20and%20other%20beasts/near/225777320" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Thom Chiovoloni <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Raz.20takes.20on.20the.20trig.20functions.20and.20other.20beasts.html#225777320">(Feb 10 2021 at 00:12)</a>:</h4>
<p>yep</p>



<a name="225779930"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Raz%20takes%20on%20the%20trig%20functions%20and%20other%20beasts/near/225779930" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Miguel Raz Guzmán Macedo <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Raz.20takes.20on.20the.20trig.20functions.20and.20other.20beasts.html#225779930">(Feb 10 2021 at 00:42)</a>:</h4>
<p>Whelp I have a deadlock or livelock or something in my code now <span aria-label="upside down" class="emoji emoji-1f643" role="img" title="upside down">:upside_down:</span></p>



<a name="225779946"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Raz%20takes%20on%20the%20trig%20functions%20and%20other%20beasts/near/225779946" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Miguel Raz Guzmán Macedo <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Raz.20takes.20on.20the.20trig.20functions.20and.20other.20beasts.html#225779946">(Feb 10 2021 at 00:42)</a>:</h4>
<p>And the debugger is not cooperating as I was hoping it would.</p>



<a name="225780079"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Raz%20takes%20on%20the%20trig%20functions%20and%20other%20beasts/near/225780079" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oliver <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Raz.20takes.20on.20the.20trig.20functions.20and.20other.20beasts.html#225780079">(Feb 10 2021 at 00:44)</a>:</h4>
<p>pic?</p>



<a name="225780327"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Raz%20takes%20on%20the%20trig%20functions%20and%20other%20beasts/near/225780327" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Miguel Raz Guzmán Macedo <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Raz.20takes.20on.20the.20trig.20functions.20and.20other.20beasts.html#225780327">(Feb 10 2021 at 00:47)</a>:</h4>
<p>Debugger seems to struggle when stepping into the <code>children.push(thread::spawn(move || loop { ...</code> function.</p>



<a name="225780329"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Raz%20takes%20on%20the%20trig%20functions%20and%20other%20beasts/near/225780329" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Miguel Raz Guzmán Macedo <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Raz.20takes.20on.20the.20trig.20functions.20and.20other.20beasts.html#225780329">(Feb 10 2021 at 00:47)</a>:</h4>
<div class="message_inline_image"><a href="https://imgur.com/E3MTswK.png"><img src="https://imgur.com/E3MTswK.png"></a></div>



<a name="225780415"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Raz%20takes%20on%20the%20trig%20functions%20and%20other%20beasts/near/225780415" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oliver <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Raz.20takes.20on.20the.20trig.20functions.20and.20other.20beasts.html#225780415">(Feb 10 2021 at 00:48)</a>:</h4>
<p>it's very probable that llvm doesn't have a concept for move closures or captures or both</p>



<a name="225780477"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Raz%20takes%20on%20the%20trig%20functions%20and%20other%20beasts/near/225780477" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Miguel Raz Guzmán Macedo <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Raz.20takes.20on.20the.20trig.20functions.20and.20other.20beasts.html#225780477">(Feb 10 2021 at 00:49)</a>:</h4>
<p><a href="/user_uploads/4715/jATO3Jafeysepah-tL1UuNji/image.png">image.png</a></p>
<div class="message_inline_image"><a href="/user_uploads/4715/jATO3Jafeysepah-tL1UuNji/image.png" title="image.png"><img src="/user_uploads/4715/jATO3Jafeysepah-tL1UuNji/image.png"></a></div>



<a name="225780483"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Raz%20takes%20on%20the%20trig%20functions%20and%20other%20beasts/near/225780483" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oliver <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Raz.20takes.20on.20the.20trig.20functions.20and.20other.20beasts.html#225780483">(Feb 10 2021 at 00:49)</a>:</h4>
<p>I'm not a debugger expert or anything</p>



<a name="225780565"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Raz%20takes%20on%20the%20trig%20functions%20and%20other%20beasts/near/225780565" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oliver <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Raz.20takes.20on.20the.20trig.20functions.20and.20other.20beasts.html#225780565">(Feb 10 2021 at 00:50)</a>:</h4>
<p>but that's the general explaination</p>



<a name="225780628"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Raz%20takes%20on%20the%20trig%20functions%20and%20other%20beasts/near/225780628" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oliver <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Raz.20takes.20on.20the.20trig.20functions.20and.20other.20beasts.html#225780628">(Feb 10 2021 at 00:51)</a>:</h4>
<p>someone mentioned that gdb support for Rust used to be better than lldb though I don't know if that still holds</p>



<a name="225780775"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Raz%20takes%20on%20the%20trig%20functions%20and%20other%20beasts/near/225780775" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oliver <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Raz.20takes.20on.20the.20trig.20functions.20and.20other.20beasts.html#225780775">(Feb 10 2021 at 00:53)</a>:</h4>
<p>you might find this useful: <a href="https://www.hawktracer.org/">https://www.hawktracer.org/</a></p>



<a name="225780903"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Raz%20takes%20on%20the%20trig%20functions%20and%20other%20beasts/near/225780903" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Miguel Raz Guzmán Macedo <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Raz.20takes.20on.20the.20trig.20functions.20and.20other.20beasts.html#225780903">(Feb 10 2021 at 00:54)</a>:</h4>
<p>Looks cool - though the one I look forward to the most is this one;<br>
<a href="https://github.com/plasma-umass/coz">https://github.com/plasma-umass/coz</a></p>



<a name="225781083"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Raz%20takes%20on%20the%20trig%20functions%20and%20other%20beasts/near/225781083" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oliver <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Raz.20takes.20on.20the.20trig.20functions.20and.20other.20beasts.html#225781083">(Feb 10 2021 at 00:56)</a>:</h4>
<p>does that have Rust bindings?</p>



<a name="225781141"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Raz%20takes%20on%20the%20trig%20functions%20and%20other%20beasts/near/225781141" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Miguel Raz Guzmán Macedo <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Raz.20takes.20on.20the.20trig.20functions.20and.20other.20beasts.html#225781141">(Feb 10 2021 at 00:57)</a>:</h4>
<p>YUP, they had a separate repo and then upstreamed it to the main one</p>



<a name="225781234"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Raz%20takes%20on%20the%20trig%20functions%20and%20other%20beasts/near/225781234" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Miguel Raz Guzmán Macedo <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Raz.20takes.20on.20the.20trig.20functions.20and.20other.20beasts.html#225781234">(Feb 10 2021 at 00:58)</a>:</h4>
<p><span class="user-mention" data-user-id="281739">@oliver</span> <a href="https://github.com/plasma-umass/coz/blob/master/rust/examples/toy.rs">https://github.com/plasma-umass/coz/blob/master/rust/examples/toy.rs</a></p>



<a name="225781321"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Raz%20takes%20on%20the%20trig%20functions%20and%20other%20beasts/near/225781321" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oliver <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Raz.20takes.20on.20the.20trig.20functions.20and.20other.20beasts.html#225781321">(Feb 10 2021 at 00:59)</a>:</h4>
<p>use that!!</p>



<a name="225781596"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Raz%20takes%20on%20the%20trig%20functions%20and%20other%20beasts/near/225781596" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Thom Chiovoloni <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Raz.20takes.20on.20the.20trig.20functions.20and.20other.20beasts.html#225781596">(Feb 10 2021 at 01:02)</a>:</h4>
<p><span class="user-mention silent" data-user-id="246783">Miguel Raz Guzmán Macedo</span> <a href="#narrow/stream/257879-project-portable-simd/topic/Raz.20takes.20on.20the.20trig.20functions.20and.20other.20beasts/near/225780903">said</a>:</p>
<blockquote>
<p>Looks cool - though the one I look forward to the most is this one;<br>
<a href="https://github.com/plasma-umass/coz">https://github.com/plasma-umass/coz</a></p>
</blockquote>
<p>that's very interesting, thanks for the link.</p>



<a name="225781846"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Raz%20takes%20on%20the%20trig%20functions%20and%20other%20beasts/near/225781846" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Miguel Raz Guzmán Macedo <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Raz.20takes.20on.20the.20trig.20functions.20and.20other.20beasts.html#225781846">(Feb 10 2021 at 01:05)</a>:</h4>
<p>No probs <span class="user-mention" data-user-id="209168">@Thom Chiovoloni</span> . Emery Berger's conference talk is a very funny and entertaining talk, 100% recommended.</p>



<a name="225781961"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Raz%20takes%20on%20the%20trig%20functions%20and%20other%20beasts/near/225781961" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oliver <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Raz.20takes.20on.20the.20trig.20functions.20and.20other.20beasts.html#225781961">(Feb 10 2021 at 01:06)</a>:</h4>
<p>what do you like about it?</p>



<a name="225782019"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Raz%20takes%20on%20the%20trig%20functions%20and%20other%20beasts/near/225782019" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Miguel Raz Guzmán Macedo <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Raz.20takes.20on.20the.20trig.20functions.20and.20other.20beasts.html#225782019">(Feb 10 2021 at 01:07)</a>:</h4>
<p>causal profiling let's you affirm the following :<br>
"I profiled this function with multi threading - if I speedup this function by x%, I can speedup my program by Y%"</p>



<a name="225782057"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Raz%20takes%20on%20the%20trig%20functions%20and%20other%20beasts/near/225782057" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Miguel Raz Guzmán Macedo <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Raz.20takes.20on.20the.20trig.20functions.20and.20other.20beasts.html#225782057">(Feb 10 2021 at 01:07)</a>:</h4>
<p>Because in multithreading land, sometimes speeding up one function can lead to the program actually going slower.</p>



<a name="225782134"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Raz%20takes%20on%20the%20trig%20functions%20and%20other%20beasts/near/225782134" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Miguel Raz Guzmán Macedo <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Raz.20takes.20on.20the.20trig.20functions.20and.20other.20beasts.html#225782134">(Feb 10 2021 at 01:08)</a>:</h4>
<p>It also runs robust statistical tests in the backend to make that affirmation and not just eyeball the statistics like "well, on average it's faster"</p>



<a name="225782206"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Raz%20takes%20on%20the%20trig%20functions%20and%20other%20beasts/near/225782206" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oliver <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Raz.20takes.20on.20the.20trig.20functions.20and.20other.20beasts.html#225782206">(Feb 10 2021 at 01:09)</a>:</h4>
<p>do you have an example file?</p>



<a name="225782395"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Raz%20takes%20on%20the%20trig%20functions%20and%20other%20beasts/near/225782395" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Miguel Raz Guzmán Macedo <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Raz.20takes.20on.20the.20trig.20functions.20and.20other.20beasts.html#225782395">(Feb 10 2021 at 01:11)</a>:</h4>
<p>Not yet - I'm trying to run it atm.<br>
Here's the juicy part of the presentation fwiw<br>
<a href="https://youtu.be/r-TLSBdHe1A?t=2177">https://youtu.be/r-TLSBdHe1A?t=2177</a></p>
<div class="youtube-video message_inline_image"><a data-id="r-TLSBdHe1A" href="https://youtu.be/r-TLSBdHe1A?t=2177"><img src="https://i.ytimg.com/vi/r-TLSBdHe1A/default.jpg"></a></div>



<a name="225782443"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Raz%20takes%20on%20the%20trig%20functions%20and%20other%20beasts/near/225782443" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Miguel Raz Guzmán Macedo <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Raz.20takes.20on.20the.20trig.20functions.20and.20other.20beasts.html#225782443">(Feb 10 2021 at 01:12)</a>:</h4>
<p>(He's also very entertaining, so it's a very light and funny watch.)</p>



<a name="225782472"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Raz%20takes%20on%20the%20trig%20functions%20and%20other%20beasts/near/225782472" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oliver <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Raz.20takes.20on.20the.20trig.20functions.20and.20other.20beasts.html#225782472">(Feb 10 2021 at 01:12)</a>:</h4>
<p>so the program speedup isn't derived it's measured along with the function?</p>



<a name="225782530"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Raz%20takes%20on%20the%20trig%20functions%20and%20other%20beasts/near/225782530" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Miguel Raz Guzmán Macedo <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Raz.20takes.20on.20the.20trig.20functions.20and.20other.20beasts.html#225782530">(Feb 10 2021 at 01:14)</a>:</h4>
<p>Sorta - They key insight in the paper is that, in a multithreaded program, if you "stop" every other thread, and let the one you want progress, you can simulate that thread being "sped up" by whatever amount you delayed everyone else.</p>



<a name="225782747"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Raz%20takes%20on%20the%20trig%20functions%20and%20other%20beasts/near/225782747" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Miguel Raz Guzmán Macedo <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Raz.20takes.20on.20the.20trig.20functions.20and.20other.20beasts.html#225782747">(Feb 10 2021 at 01:16)</a>:</h4>
<p>Then you add the following careful observations:<br>
If you repeatedly shuffle a bunch of factors about your program, and measure the different "speedups", by the law of large numbers all those other effects will add up to random noise in the aggregate.</p>
<p>This is very, very freaking worrying because the team found certain programs that got 30% perf whacks because of the person's user name (as that would make a perf critical section overlap different pages and take a horrible caching hit) amongst many other shenanigans. Coz takes trouble to randomize memory addresses and many other things to get statistical guarantees about the performance prediction.</p>



<a name="225782782"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Raz%20takes%20on%20the%20trig%20functions%20and%20other%20beasts/near/225782782" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Miguel Raz Guzmán Macedo <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Raz.20takes.20on.20the.20trig.20functions.20and.20other.20beasts.html#225782782">(Feb 10 2021 at 01:17)</a>:</h4>
<p>(Not to mention the super fun cases of -O3 running slower than -O2.)</p>



<a name="225782795"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Raz%20takes%20on%20the%20trig%20functions%20and%20other%20beasts/near/225782795" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Miguel Raz Guzmán Macedo <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Raz.20takes.20on.20the.20trig.20functions.20and.20other.20beasts.html#225782795">(Feb 10 2021 at 01:17)</a>:</h4>
<p>So yeah, verifying optimizations actually work and are better than a null hypothesis - important!</p>



<a name="225783008"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Raz%20takes%20on%20the%20trig%20functions%20and%20other%20beasts/near/225783008" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oliver <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Raz.20takes.20on.20the.20trig.20functions.20and.20other.20beasts.html#225783008">(Feb 10 2021 at 01:20)</a>:</h4>
<p>(deleted)</p>



<a name="225948599"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Raz%20takes%20on%20the%20trig%20functions%20and%20other%20beasts/near/225948599" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jubilee <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Raz.20takes.20on.20the.20trig.20functions.20and.20other.20beasts.html#225948599">(Feb 11 2021 at 04:49)</a>:</h4>
<p><span class="user-mention" data-user-id="246783">@Miguel Raz Guzmán Macedo</span><br>
<a href="https://play.rust-lang.org/?version=nightly&amp;mode=release&amp;edition=2018&amp;gist=ea771aa8939937399412ea442f990348">https://play.rust-lang.org/?version=nightly&amp;mode=release&amp;edition=2018&amp;gist=ea771aa8939937399412ea442f990348</a><br>
There is a <code>simd_fcos</code> you might want to start with, in the compiler, and also a <code>simd_fsin</code>.</p>



<a name="225948724"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Raz%20takes%20on%20the%20trig%20functions%20and%20other%20beasts/near/225948724" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Miguel Raz Guzmán Macedo <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Raz.20takes.20on.20the.20trig.20functions.20and.20other.20beasts.html#225948724">(Feb 11 2021 at 04:52)</a>:</h4>
<p>Noted.</p>



<a name="225948755"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Raz%20takes%20on%20the%20trig%20functions%20and%20other%20beasts/near/225948755" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jubilee <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Raz.20takes.20on.20the.20trig.20functions.20and.20other.20beasts.html#225948755">(Feb 11 2021 at 04:53)</a>:</h4>
<p>It does not appear to compile to any weird strange Intel instruction, SHOCKINGLY, DESPITE THERE BEING MANY, just what I assume is a reasonably-optimized set of multiplications and such.</p>



<a name="225951828"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Raz%20takes%20on%20the%20trig%20functions%20and%20other%20beasts/near/225951828" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Thom Chiovoloni <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Raz.20takes.20on.20the.20trig.20functions.20and.20other.20beasts.html#225951828">(Feb 11 2021 at 06:02)</a>:</h4>
<p>it compiles to 4 calls to <code>cosf</code> for me, which unfortunately isn't usable for libcore</p>



<a name="225952046"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Raz%20takes%20on%20the%20trig%20functions%20and%20other%20beasts/near/225952046" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jubilee <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Raz.20takes.20on.20the.20trig.20functions.20and.20other.20beasts.html#225952046">(Feb 11 2021 at 06:07)</a>:</h4>
<p>ohh.</p>



<a name="225952063"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Raz%20takes%20on%20the%20trig%20functions%20and%20other%20beasts/near/225952063" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jubilee <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Raz.20takes.20on.20the.20trig.20functions.20and.20other.20beasts.html#225952063">(Feb 11 2021 at 06:07)</a>:</h4>
<p><span class="user-mention" data-user-id="209168">@Thom Chiovoloni</span> wait so that's to libm?</p>



<a name="225952103"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Raz%20takes%20on%20the%20trig%20functions%20and%20other%20beasts/near/225952103" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Thom Chiovoloni <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Raz.20takes.20on.20the.20trig.20functions.20and.20other.20beasts.html#225952103">(Feb 11 2021 at 06:08)</a>:</h4>
<p>mhm</p>



<a name="225952109"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Raz%20takes%20on%20the%20trig%20functions%20and%20other%20beasts/near/225952109" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jubilee <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Raz.20takes.20on.20the.20trig.20functions.20and.20other.20beasts.html#225952109">(Feb 11 2021 at 06:08)</a>:</h4>
<p>ohhhh... damn! nevermind then.</p>



<a name="225952112"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Raz%20takes%20on%20the%20trig%20functions%20and%20other%20beasts/near/225952112" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jubilee <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Raz.20takes.20on.20the.20trig.20functions.20and.20other.20beasts.html#225952112">(Feb 11 2021 at 06:08)</a>:</h4>
<p><span class="user-mention" data-user-id="246783">@Miguel Raz Guzmán Macedo</span> DISREGARD.</p>



<a name="225952240"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Raz%20takes%20on%20the%20trig%20functions%20and%20other%20beasts/near/225952240" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Thom Chiovoloni <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Raz.20takes.20on.20the.20trig.20functions.20and.20other.20beasts.html#225952240">(Feb 11 2021 at 06:11)</a>:</h4>
<p><a href="https://rust.godbolt.org/z/xaWbjT">https://rust.godbolt.org/z/xaWbjT</a></p>
<p>I imagine if there <em>is</em> an instruction for this, that would emit it, and I doubt there's a way to do it otherwise. We sort of want a way to test if the target actually has an optimized impl</p>



<a name="225952248"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Raz%20takes%20on%20the%20trig%20functions%20and%20other%20beasts/near/225952248" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Thom Chiovoloni <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Raz.20takes.20on.20the.20trig.20functions.20and.20other.20beasts.html#225952248">(Feb 11 2021 at 06:11)</a>:</h4>
<p>that said historically the way this gets solved is landing code in <a href="https://github.com/rust-lang/compiler-builtins">https://github.com/rust-lang/compiler-builtins</a>, i think</p>



<a name="225952347"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Raz%20takes%20on%20the%20trig%20functions%20and%20other%20beasts/near/225952347" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Thom Chiovoloni <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Raz.20takes.20on.20the.20trig.20functions.20and.20other.20beasts.html#225952347">(Feb 11 2021 at 06:13)</a>:</h4>
<p>i believe the reason that's not really done for libm-in-core (even though it clearly could be — that project even has a libm submodule) is that we do actually want to use system libm wherever possible because it's likely much better than libm-rust. But this doesnt apply to something like simd_fcos</p>



<a name="225952418"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Raz%20takes%20on%20the%20trig%20functions%20and%20other%20beasts/near/225952418" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Thom Chiovoloni <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Raz.20takes.20on.20the.20trig.20functions.20and.20other.20beasts.html#225952418">(Feb 11 2021 at 06:14)</a>:</h4>
<p><span class="user-mention silent" data-user-id="209168">Thom Chiovoloni</span> <a href="#narrow/stream/257879-project-portable-simd/topic/Raz.20takes.20on.20the.20trig.20functions.20and.20other.20beasts/near/225641090">said</a>:</p>
<blockquote>
<p>I actually thought about doing a few of these a while ago but wasnt 100% certain where it would go, since eventually to support the arches with this builtin we need a <code>simd_sin</code> (or w/e) builtin, but then we need to provide the manual fallback on the ones without it.</p>
</blockquote>
<p>This whole mess... is kinda what i was alluding to here.</p>



<a name="225952516"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Raz%20takes%20on%20the%20trig%20functions%20and%20other%20beasts/near/225952516" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jubilee <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Raz.20takes.20on.20the.20trig.20functions.20and.20other.20beasts.html#225952516">(Feb 11 2021 at 06:16)</a>:</h4>
<p>welp.</p>



<a name="225952535"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Raz%20takes%20on%20the%20trig%20functions%20and%20other%20beasts/near/225952535" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jubilee <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Raz.20takes.20on.20the.20trig.20functions.20and.20other.20beasts.html#225952535">(Feb 11 2021 at 06:17)</a>:</h4>
<p>can you summarize these problems in the issue for future reference, given that I am pretty sure this is my 2nd time hearing this.</p>



<a name="225952576"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Raz%20takes%20on%20the%20trig%20functions%20and%20other%20beasts/near/225952576" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Thom Chiovoloni <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Raz.20takes.20on.20the.20trig.20functions.20and.20other.20beasts.html#225952576">(Feb 11 2021 at 06:18)</a>:</h4>
<p>that said perhaps a way forward would be:</p>
<ol>
<li>implement them "in software" in the core_arch crate</li>
<li>figure out the situation for lowering to an actual platform intrinsic on platforms that have hardware vectorized cosine later</li>
</ol>
<p>are we supporting platforms out of the gate that actually have these instructions?</p>



<a name="225952577"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Raz%20takes%20on%20the%20trig%20functions%20and%20other%20beasts/near/225952577" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jubilee <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Raz.20takes.20on.20the.20trig.20functions.20and.20other.20beasts.html#225952577">(Feb 11 2021 at 06:18)</a>:</h4>
<p>it would be much appreciated if plausible.</p>



<a name="225952578"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Raz%20takes%20on%20the%20trig%20functions%20and%20other%20beasts/near/225952578" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jubilee <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Raz.20takes.20on.20the.20trig.20functions.20and.20other.20beasts.html#225952578">(Feb 11 2021 at 06:18)</a>:</h4>
<p>I am not sure.</p>



<a name="225952617"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Raz%20takes%20on%20the%20trig%20functions%20and%20other%20beasts/near/225952617" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Thom Chiovoloni <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Raz.20takes.20on.20the.20trig.20functions.20and.20other.20beasts.html#225952617">(Feb 11 2021 at 06:19)</a>:</h4>
<p>uh, sadly i'm a bit preoccupied right now, but i can probably fill it in tomorrow. i also could basically copypaste the zulip convo in but, i imagine that's not quite what you want</p>



<a name="225952656"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Raz%20takes%20on%20the%20trig%20functions%20and%20other%20beasts/near/225952656" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jubilee <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Raz.20takes.20on.20the.20trig.20functions.20and.20other.20beasts.html#225952656">(Feb 11 2021 at 06:20)</a>:</h4>
<p>At your leisure, ofc.</p>



<a name="226224483"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Raz%20takes%20on%20the%20trig%20functions%20and%20other%20beasts/near/226224483" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jubilee <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Raz.20takes.20on.20the.20trig.20functions.20and.20other.20beasts.html#226224483">(Feb 13 2021 at 03:49)</a>:</h4>
<p><a href="https://github.com/rust-lang/rust/issues/50145">https://github.com/rust-lang/rust/issues/50145</a> aha</p>



<a name="226232258"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Raz%20takes%20on%20the%20trig%20functions%20and%20other%20beasts/near/226232258" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jubilee <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Raz.20takes.20on.20the.20trig.20functions.20and.20other.20beasts.html#226232258">(Feb 13 2021 at 07:33)</a>:</h4>
<p><a href="https://github.com/rust-lang/stdsimd/pull/73">https://github.com/rust-lang/stdsimd/pull/73</a> Would this have settled your questions from way back when, <span class="user-mention" data-user-id="246783">@Miguel Raz Guzmán Macedo</span>?</p>



<a name="226259385"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Raz%20takes%20on%20the%20trig%20functions%20and%20other%20beasts/near/226259385" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Miguel Raz Guzmán Macedo <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Raz.20takes.20on.20the.20trig.20functions.20and.20other.20beasts.html#226259385">(Feb 13 2021 at 18:20)</a>:</h4>
<p>Yes, it does help. Let me try and add a specific code snippet to see if that helps clarify it a little bit.<br>
I tried putting the simplest sum loop to the see the autovectorizer in action but the ASM output was quite dizzying.<br>
Here's my attempt at it in the <a href="http://lang.org/?version=stable&amp;mode=debug&amp;edition=2018&amp;gist=bbbd67fd4b5b63b570e67aeb8803d706">Rust Playground</a></p>



<a name="226259543"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Raz%20takes%20on%20the%20trig%20functions%20and%20other%20beasts/near/226259543" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Miguel Raz Guzmán Macedo <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Raz.20takes.20on.20the.20trig.20functions.20and.20other.20beasts.html#226259543">(Feb 13 2021 at 18:24)</a>:</h4>
<p>The idea was to have a code snippet that was like "This is a very simple sum loop on floats, so the autovectorizer is very likely to hit, here are the <code>xmm</code> registers being shuffled around (decent indication that the autovectorizer was used. This is us using the <code>stdsimd</code> internals to build that stuff ourselves and screaming at the compiler to actually use the vector registers.</p>



<a name="226259684"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Raz%20takes%20on%20the%20trig%20functions%20and%20other%20beasts/near/226259684" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jubilee <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Raz.20takes.20on.20the.20trig.20functions.20and.20other.20beasts.html#226259684">(Feb 13 2021 at 18:27)</a>:</h4>
<p><a href="https://play.rust-lang.org/?version=stable&amp;mode=debug&amp;edition=2018&amp;gist=bbbd67fd4b5b63b570e67aeb8803d706">https://play.rust-lang.org/?version=stable&amp;mode=debug&amp;edition=2018&amp;gist=bbbd67fd4b5b63b570e67aeb8803d706</a> ?</p>
<p>Make sure to turn on Release... the optimizer basically doesn't do jack until you push it into release, lol.<br>
<span class="user-mention" data-user-id="246783">@Miguel Raz Guzmán Macedo</span> Also, don't use floats if you want "xmm is proof that SIMD happened". xmm registers actually are used for scalar floats very often in x86_64!</p>



<a name="226259743"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Raz%20takes%20on%20the%20trig%20functions%20and%20other%20beasts/near/226259743" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jubilee <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Raz.20takes.20on.20the.20trig.20functions.20and.20other.20beasts.html#226259743">(Feb 13 2021 at 18:28)</a>:</h4>
<p>And yes, basically it's forcing an expression of "parallelize this using the SIMD pattern" into the compiler.</p>



<a name="226259764"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Raz%20takes%20on%20the%20trig%20functions%20and%20other%20beasts/near/226259764" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Miguel Raz Guzmán Macedo <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Raz.20takes.20on.20the.20trig.20functions.20and.20other.20beasts.html#226259764">(Feb 13 2021 at 18:29)</a>:</h4>
<p>Gah, bitten again by default debug build! Yeah that explains the tomes of unoptimized assembly then.</p>



<a name="226259774"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Raz%20takes%20on%20the%20trig%20functions%20and%20other%20beasts/near/226259774" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Miguel Raz Guzmán Macedo <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Raz.20takes.20on.20the.20trig.20functions.20and.20other.20beasts.html#226259774">(Feb 13 2021 at 18:29)</a>:</h4>
<p>Oh wow on the <code>x86_64</code> thing o.0</p>



<a name="226260010"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Raz%20takes%20on%20the%20trig%20functions%20and%20other%20beasts/near/226260010" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jubilee <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Raz.20takes.20on.20the.20trig.20functions.20and.20other.20beasts.html#226260010">(Feb 13 2021 at 18:34)</a>:</h4>
<p>Yeah so, basically, x86 has these float registers that are 80 bit floating point registers, but x86_64 has SSE2 by default, which means it has xmm registers including floating point, and those can do 32 bit or 64 bit floating point. The calling convention for "x64" actually specifies use of the xmm registers for most floating point things. Partially this is because everyone realized MMX was a mistake, lol.</p>
<p>MMX was the first attempt to enable SIMD on x86. It... switches the floating point registers that previously were used into a new state, and you have to emit an instruction to switch them back. But this was incredibly unwieldy in practice. There's a reason we just removed it from Rust.</p>



<a name="226263296"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Raz%20takes%20on%20the%20trig%20functions%20and%20other%20beasts/near/226263296" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Miguel Raz Guzmán Macedo <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Raz.20takes.20on.20the.20trig.20functions.20and.20other.20beasts.html#226263296">(Feb 13 2021 at 19:47)</a>:</h4>
<p>(deleted)</p>



<a name="226277543"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Raz%20takes%20on%20the%20trig%20functions%20and%20other%20beasts/near/226277543" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jubilee <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Raz.20takes.20on.20the.20trig.20functions.20and.20other.20beasts.html#226277543">(Feb 14 2021 at 00:41)</a>:</h4>
<p><a href="https://github.com/rust-lang/stdsimd/pull/73/files">https://github.com/rust-lang/stdsimd/pull/73/files</a> still good?</p>
<p>I saved the notes on what else was in there, but after some thought I think we should throw in a "tips &amp;&amp; tricks: reading asm" bit as a separate section.</p>



<a name="226277723"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Raz%20takes%20on%20the%20trig%20functions%20and%20other%20beasts/near/226277723" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Miguel Raz Guzmán Macedo <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Raz.20takes.20on.20the.20trig.20functions.20and.20other.20beasts.html#226277723">(Feb 14 2021 at 00:47)</a>:</h4>
<p>Just approved. LGTM!</p>



<a name="226277780"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Raz%20takes%20on%20the%20trig%20functions%20and%20other%20beasts/near/226277780" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jubilee <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Raz.20takes.20on.20the.20trig.20functions.20and.20other.20beasts.html#226277780">(Feb 14 2021 at 00:48)</a>:</h4>
<p>hehe</p>



<a name="226278008"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Raz%20takes%20on%20the%20trig%20functions%20and%20other%20beasts/near/226278008" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jubilee <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Raz.20takes.20on.20the.20trig.20functions.20and.20other.20beasts.html#226278008">(Feb 14 2021 at 00:54)</a>:</h4>
<p>there's a slight problem in trying to get an example of a "simple" autovectorization occurring and that is basically "compiler perturbations lol".</p>



<a name="226278185"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Raz%20takes%20on%20the%20trig%20functions%20and%20other%20beasts/near/226278185" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Miguel Raz Guzmán Macedo <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Raz.20takes.20on.20the.20trig.20functions.20and.20other.20beasts.html#226278185">(Feb 14 2021 at 00:59)</a>:</h4>
<p>silly compilers getting in the way of My Perfect Code <span aria-label="tm" class="emoji emoji-2122" role="img" title="tm">:tm:</span></p>



<a name="226278206"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Raz%20takes%20on%20the%20trig%20functions%20and%20other%20beasts/near/226278206" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jubilee <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Raz.20takes.20on.20the.20trig.20functions.20and.20other.20beasts.html#226278206">(Feb 14 2021 at 01:00)</a>:</h4>
<p>like, we can definitely try to include a demo and some sample code to try to help "sell" the library, but it will have to literally include the disclaimer of "lol this might not autovectorize even though we say it should, which incidentally is also the point of the library".</p>



<a name="226316526"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Raz%20takes%20on%20the%20trig%20functions%20and%20other%20beasts/near/226316526" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jacob Lifshay <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Raz.20takes.20on.20the.20trig.20functions.20and.20other.20beasts.html#226316526">(Feb 14 2021 at 17:49)</a>:</h4>
<p><span class="user-mention silent" data-user-id="281757">Jubilee</span> <a href="#narrow/stream/257879-project-portable-simd/topic/Raz.20takes.20on.20the.20trig.20functions.20and.20other.20beasts/near/226260010">said</a>:</p>
<blockquote>
<p>Yeah so, basically, x86 has these float registers that are 80 bit floating point registers, but x86_64 has SSE2 by default, which means it has xmm registers including floating point, and those can do 32 bit or 64 bit floating point. The calling convention for "x64" actually specifies use of the xmm registers for most floating point things. Partially this is because everyone realized MMX was a mistake, lol.</p>
</blockquote>
<p>Another big reason x86_64 switched to using <code>xmm</code> registers for floating-point is that it makes floating-point math more consistent so a <code>f32</code> always works in <code>f32</code> precision, and a <code>f64</code> always works in <code>f64</code> precision. previously, since they used 80-bit floating point registers and operations, a <code>f32</code> would have <code>f32</code> precision only in memory, if it were in registers it would have 80-bit precision. similarly for <code>f64</code>. this made for confusing identities and rounding rules and made code behave differently on x86 compared to Arm or PowerPC or nearly every other CPU.</p>



<a name="226328644"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Raz%20takes%20on%20the%20trig%20functions%20and%20other%20beasts/near/226328644" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Miguel Raz Guzmán Macedo <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Raz.20takes.20on.20the.20trig.20functions.20and.20other.20beasts.html#226328644">(Feb 14 2021 at 22:12)</a>:</h4>
<p>Muahaha useless internet competition points! Julia at 29, Rust at 30.<br>
<a href="https://www.tiobe.com/tiobe-index/">https://www.tiobe.com/tiobe-index/</a></p>



<a name="226328731"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Raz%20takes%20on%20the%20trig%20functions%20and%20other%20beasts/near/226328731" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Miguel Raz Guzmán Macedo <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Raz.20takes.20on.20the.20trig.20functions.20and.20other.20beasts.html#226328731">(Feb 14 2021 at 22:13)</a>:</h4>
<p>Whatcha gonna do <span class="user-mention" data-user-id="281757">@Jubilee</span> <span aria-label="octopus" class="emoji emoji-1f419" role="img" title="octopus">:octopus:</span></p>



<a name="226329112"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Raz%20takes%20on%20the%20trig%20functions%20and%20other%20beasts/near/226329112" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oliver <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Raz.20takes.20on.20the.20trig.20functions.20and.20other.20beasts.html#226329112">(Feb 14 2021 at 22:23)</a>:</h4>
<p>you must be a good scientist if you care about a 0.03% delta</p>



<a name="226329206"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Raz%20takes%20on%20the%20trig%20functions%20and%20other%20beasts/near/226329206" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Miguel Raz Guzmán Macedo <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Raz.20takes.20on.20the.20trig.20functions.20and.20other.20beasts.html#226329206">(Feb 14 2021 at 22:25)</a>:</h4>
<p>Nothing but the best Science <span aria-label="tm" class="emoji emoji-2122" role="img" title="tm">:tm:</span> to back up all my opinions to die on <span aria-label="muscle" class="emoji emoji-1f4aa" role="img" title="muscle">:muscle:</span></p>



<a name="226330654"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Raz%20takes%20on%20the%20trig%20functions%20and%20other%20beasts/near/226330654" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oliver <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Raz.20takes.20on.20the.20trig.20functions.20and.20other.20beasts.html#226330654">(Feb 14 2021 at 23:02)</a>:</h4>
<p>will you wave from the moon?</p>



<a name="226330690"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Raz%20takes%20on%20the%20trig%20functions%20and%20other%20beasts/near/226330690" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oliver <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Raz.20takes.20on.20the.20trig.20functions.20and.20other.20beasts.html#226330690">(Feb 14 2021 at 23:02)</a>:</h4>
<p>in your space helmet</p>



<a name="226334629"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Raz%20takes%20on%20the%20trig%20functions%20and%20other%20beasts/near/226334629" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jubilee <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Raz.20takes.20on.20the.20trig.20functions.20and.20other.20beasts.html#226334629">(Feb 15 2021 at 00:30)</a>:</h4>
<p><span class="user-mention" data-user-id="246783">@Miguel Raz Guzmán Macedo</span> would you care to do a more comprehensive literature review <a href="https://insights.stackoverflow.com/survey/2020#technology-most-loved-dreaded-and-wanted-languages-loved">https://insights.stackoverflow.com/survey/2020#technology-most-loved-dreaded-and-wanted-languages-loved</a></p>



<a name="226334640"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Raz%20takes%20on%20the%20trig%20functions%20and%20other%20beasts/near/226334640" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Miguel Raz Guzmán Macedo <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Raz.20takes.20on.20the.20trig.20functions.20and.20other.20beasts.html#226334640">(Feb 15 2021 at 00:31)</a>:</h4>
<p>Jajaja, nice.</p>



<a name="226334650"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Raz%20takes%20on%20the%20trig%20functions%20and%20other%20beasts/near/226334650" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Miguel Raz Guzmán Macedo <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Raz.20takes.20on.20the.20trig.20functions.20and.20other.20beasts.html#226334650">(Feb 15 2021 at 00:31)</a>:</h4>
<p>Clearly a conspiracy in action by BigRust!</p>



<a name="226334701"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Raz%20takes%20on%20the%20trig%20functions%20and%20other%20beasts/near/226334701" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Miguel Raz Guzmán Macedo <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Raz.20takes.20on.20the.20trig.20functions.20and.20other.20beasts.html#226334701">(Feb 15 2021 at 00:32)</a>:</h4>
<p>All jokes aside, I enjoy that there's tons of people working on a safe, cool language that empowers people to build hard stuff. Credit where it's due.</p>



<a name="226400607"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Raz%20takes%20on%20the%20trig%20functions%20and%20other%20beasts/near/226400607" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Miguel Raz Guzmán Macedo <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Raz.20takes.20on.20the.20trig.20functions.20and.20other.20beasts.html#226400607">(Feb 15 2021 at 15:59)</a>:</h4>
<p>What IDE do people use? I'm trying to figure out rust-analyzer vs Rust VSCode plugins.</p>



<a name="226401127"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Raz%20takes%20on%20the%20trig%20functions%20and%20other%20beasts/near/226401127" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Miguel Raz Guzmán Macedo <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Raz.20takes.20on.20the.20trig.20functions.20and.20other.20beasts.html#226401127">(Feb 15 2021 at 16:01)</a>:</h4>
<p>Oh, I can just click the settings on the Rust Plugin to have rust-analyzer as a backend. Noooice.</p>



<a name="226431579"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Raz%20takes%20on%20the%20trig%20functions%20and%20other%20beasts/near/226431579" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jubilee <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Raz.20takes.20on.20the.20trig.20functions.20and.20other.20beasts.html#226431579">(Feb 15 2021 at 21:27)</a>:</h4>
<p>My IDE is Unix. :^)<br>
but yes, "whatever lets people use rust-analyzer, or quickly <code>cargo check</code>".<br>
Oh, and it's very important to actually run <code>cargo check</code> if you run into a sticking point, rust-analyzer interfaces usually fail to pass on all the information relevant that rustc has.</p>



<a name="239809403"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Raz%20takes%20on%20the%20trig%20functions%20and%20other%20beasts/near/239809403" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Miguel Raz Guzmán Macedo <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Raz.20takes.20on.20the.20trig.20functions.20and.20other.20beasts.html#239809403">(May 21 2021 at 20:33)</a>:</h4>
<p>Bumping this up again.<br>
<span class="user-mention" data-user-id="281757">@Jubilee</span> would porting Julia's libm re-implementation of <code>simd_fcos</code> for 32bit floats be a good starting point?</p>



<a name="239809551"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Raz%20takes%20on%20the%20trig%20functions%20and%20other%20beasts/near/239809551" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jacob Lifshay <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Raz.20takes.20on.20the.20trig.20functions.20and.20other.20beasts.html#239809551">(May 21 2021 at 20:34)</a>:</h4>
<p>wait, julia has a simd cos?</p>



<a name="239809579"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Raz%20takes%20on%20the%20trig%20functions%20and%20other%20beasts/near/239809579" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jacob Lifshay <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Raz.20takes.20on.20the.20trig.20functions.20and.20other.20beasts.html#239809579">(May 21 2021 at 20:34)</a>:</h4>
<p>I only saw the scalar version</p>



<a name="239809625"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Raz%20takes%20on%20the%20trig%20functions%20and%20other%20beasts/near/239809625" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Miguel Raz Guzmán Macedo <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Raz.20takes.20on.20the.20trig.20functions.20and.20other.20beasts.html#239809625">(May 21 2021 at 20:35)</a>:</h4>
<p>We have a scalar version, but I imagine calling the <code>stdsimd</code> on appropriate length lanes would be a decent starting point.</p>



<a name="239809672"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Raz%20takes%20on%20the%20trig%20functions%20and%20other%20beasts/near/239809672" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Miguel Raz Guzmán Macedo <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Raz.20takes.20on.20the.20trig.20functions.20and.20other.20beasts.html#239809672">(May 21 2021 at 20:35)</a>:</h4>
<p>Unless I'm missing some key steps into how calculating <code>simd_fcos</code> is different from a scalar <code>cos</code> applied to many lanes.</p>



<a name="239809926"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Raz%20takes%20on%20the%20trig%20functions%20and%20other%20beasts/near/239809926" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jacob Lifshay <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Raz.20takes.20on.20the.20trig.20functions.20and.20other.20beasts.html#239809926">(May 21 2021 at 20:37)</a>:</h4>
<p>the code would usually be reorganized since stuff like <code>match</code> expressions don't really vectorize that well</p>



<a name="239810138"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Raz%20takes%20on%20the%20trig%20functions%20and%20other%20beasts/near/239810138" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jacob Lifshay <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Raz.20takes.20on.20the.20trig.20functions.20and.20other.20beasts.html#239810138">(May 21 2021 at 20:39)</a>:</h4>
<p>See the implementation of <code>sin_cos_pi</code> in vector-math for an example: <a href="https://salsa.debian.org/Kazan-team/vector-math/-/blob/f2d096a09d964631f8273f2c8ca0d1fa0ddfbdfc/src/algorithms/trig_pi.rs#L143">https://salsa.debian.org/Kazan-team/vector-math/-/blob/f2d096a09d964631f8273f2c8ca0d1fa0ddfbdfc/src/algorithms/trig_pi.rs#L143</a></p>



<a name="239810316"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Raz%20takes%20on%20the%20trig%20functions%20and%20other%20beasts/near/239810316" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jacob Lifshay <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Raz.20takes.20on.20the.20trig.20functions.20and.20other.20beasts.html#239810316">(May 21 2021 at 20:41)</a>:</h4>
<p>If you do create a vector sin implementation, please put it in vector-math, and please use the <code>Context</code> abstraction layer so Kazan can also use it.</p>



<a name="239810327"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Raz%20takes%20on%20the%20trig%20functions%20and%20other%20beasts/near/239810327" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Miguel Raz Guzmán Macedo <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Raz.20takes.20on.20the.20trig.20functions.20and.20other.20beasts.html#239810327">(May 21 2021 at 20:41)</a>:</h4>
<p>...wat.<br>
What is that code?<br>
Dear Lord Rust does not look like math at all sometimes <span aria-label="sad" class="emoji emoji-2639" role="img" title="sad">:sad:</span></p>



<a name="239810449"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Raz%20takes%20on%20the%20trig%20functions%20and%20other%20beasts/near/239810449" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Miguel Raz Guzmán Macedo <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Raz.20takes.20on.20the.20trig.20functions.20and.20other.20beasts.html#239810449">(May 21 2021 at 20:42)</a>:</h4>
<p>What is Kazan and what are the <code>Context</code> abstraction layers?</p>



<a name="239810525"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Raz%20takes%20on%20the%20trig%20functions%20and%20other%20beasts/near/239810525" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jacob Lifshay <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Raz.20takes.20on.20the.20trig.20functions.20and.20other.20beasts.html#239810525">(May 21 2021 at 20:43)</a>:</h4>
<p>See all the stuff I wrote here: <a href="https://github.com/rust-lang/stdsimd/issues/109">https://github.com/rust-lang/stdsimd/issues/109</a></p>



<a name="239810611"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Raz%20takes%20on%20the%20trig%20functions%20and%20other%20beasts/near/239810611" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jacob Lifshay <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Raz.20takes.20on.20the.20trig.20functions.20and.20other.20beasts.html#239810611">(May 21 2021 at 20:44)</a>:</h4>
<p>Kazan is a Vulkan GPU driver for Libre-SOC</p>



<a name="239810846"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Raz%20takes%20on%20the%20trig%20functions%20and%20other%20beasts/near/239810846" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Miguel Raz Guzmán Macedo <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Raz.20takes.20on.20the.20trig.20functions.20and.20other.20beasts.html#239810846">(May 21 2021 at 20:46)</a>:</h4>
<p>Oh neat.</p>



<a name="239810847"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Raz%20takes%20on%20the%20trig%20functions%20and%20other%20beasts/near/239810847" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jacob Lifshay <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Raz.20takes.20on.20the.20trig.20functions.20and.20other.20beasts.html#239810847">(May 21 2021 at 20:46)</a>:</h4>
<p>Context is a trait designed to allow algorithms to either be directly executed (by passing an empty struct as the Context) or to generate compiler IR (by passing a reference to the compilers' internals as the Context)</p>



<a name="239810992"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Raz%20takes%20on%20the%20trig%20functions%20and%20other%20beasts/near/239810992" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jacob Lifshay <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Raz.20takes.20on.20the.20trig.20functions.20and.20other.20beasts.html#239810992">(May 21 2021 at 20:47)</a>:</h4>
<p>direct execution using <code>Scalar</code> as a <code>Context</code>: <a href="https://salsa.debian.org/Kazan-team/vector-math/-/blob/master/src/scalar.rs">https://salsa.debian.org/Kazan-team/vector-math/-/blob/master/src/scalar.rs</a></p>



<a name="239811114"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Raz%20takes%20on%20the%20trig%20functions%20and%20other%20beasts/near/239811114" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jacob Lifshay <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Raz.20takes.20on.20the.20trig.20functions.20and.20other.20beasts.html#239811114">(May 21 2021 at 20:48)</a>:</h4>
<p>direct execution using <code>core::simd</code>: <a href="https://salsa.debian.org/Kazan-team/vector-math/-/blob/master/src/stdsimd.rs">https://salsa.debian.org/Kazan-team/vector-math/-/blob/master/src/stdsimd.rs</a></p>



<a name="239811177"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Raz%20takes%20on%20the%20trig%20functions%20and%20other%20beasts/near/239811177" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jacob Lifshay <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Raz.20takes.20on.20the.20trig.20functions.20and.20other.20beasts.html#239811177">(May 21 2021 at 20:49)</a>:</h4>
<p>demo of generating compiler IR: <a href="https://salsa.debian.org/Kazan-team/vector-math/-/blob/master/src/ir.rs#L1663">https://salsa.debian.org/Kazan-team/vector-math/-/blob/master/src/ir.rs#L1663</a></p>



<a name="239811296"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Raz%20takes%20on%20the%20trig%20functions%20and%20other%20beasts/near/239811296" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Miguel Raz Guzmán Macedo <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Raz.20takes.20on.20the.20trig.20functions.20and.20other.20beasts.html#239811296">(May 21 2021 at 20:50)</a>:</h4>
<p><span class="user-mention" data-user-id="229517">@Jacob Lifshay</span> ok, that projects seems very cool, but I'm working on a "small Rust at a time" scope and trying to figure out what's just beyond my reach and work towards it. I think that project is a bit too much complexity for me to handle at the moment.</p>



<a name="239811345"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Raz%20takes%20on%20the%20trig%20functions%20and%20other%20beasts/near/239811345" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Miguel Raz Guzmán Macedo <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Raz.20takes.20on.20the.20trig.20functions.20and.20other.20beasts.html#239811345">(May 21 2021 at 20:50)</a>:</h4>
<p>Others may be interested - I'm just trying to figure out a good plan for something manageable to work on.</p>



<a name="239811370"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Raz%20takes%20on%20the%20trig%20functions%20and%20other%20beasts/near/239811370" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jacob Lifshay <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Raz.20takes.20on.20the.20trig.20functions.20and.20other.20beasts.html#239811370">(May 21 2021 at 20:50)</a>:</h4>
<p>ok, good luck!</p>



<a name="239811429"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Raz%20takes%20on%20the%20trig%20functions%20and%20other%20beasts/near/239811429" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Miguel Raz Guzmán Macedo <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Raz.20takes.20on.20the.20trig.20functions.20and.20other.20beasts.html#239811429">(May 21 2021 at 20:51)</a>:</h4>
<p>(It maybe be that it's feasible but I don't have enough information to conclude that right now.)</p>



<a name="239811450"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Raz%20takes%20on%20the%20trig%20functions%20and%20other%20beasts/near/239811450" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jacob Lifshay <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Raz.20takes.20on.20the.20trig.20functions.20and.20other.20beasts.html#239811450">(May 21 2021 at 20:51)</a>:</h4>
<p>an example of a much simpler function: <a href="https://salsa.debian.org/Kazan-team/vector-math/-/blob/master/src/algorithms/base.rs#L18">https://salsa.debian.org/Kazan-team/vector-math/-/blob/master/src/algorithms/base.rs#L18</a></p>



<a name="239811466"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Raz%20takes%20on%20the%20trig%20functions%20and%20other%20beasts/near/239811466" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jacob Lifshay <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Raz.20takes.20on.20the.20trig.20functions.20and.20other.20beasts.html#239811466">(May 21 2021 at 20:52)</a>:</h4>
<p>^ <code>copy_sign</code></p>



<a name="239811780"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Raz%20takes%20on%20the%20trig%20functions%20and%20other%20beasts/near/239811780" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jacob Lifshay <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Raz.20takes.20on.20the.20trig.20functions.20and.20other.20beasts.html#239811780">(May 21 2021 at 20:54)</a>:</h4>
<p>I tried to design <code>Context</code> to be as easy as possible to write algorithms using, pushing nearly all the burden onto those writing new <code>Context</code> implementations</p>



<a name="239812715"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Raz%20takes%20on%20the%20trig%20functions%20and%20other%20beasts/near/239812715" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jubilee <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Raz.20takes.20on.20the.20trig.20functions.20and.20other.20beasts.html#239812715">(May 21 2021 at 21:03)</a>:</h4>
<p>There <em>is</em> a more fundamental issue at hand: SIMD functions cannot branch, otherwise you cannot do it in parallel, and I do not know if Julia's impementation uses <code>if</code> and the like.</p>



<a name="239812773"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Raz%20takes%20on%20the%20trig%20functions%20and%20other%20beasts/near/239812773" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jacob Lifshay <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Raz.20takes.20on.20the.20trig.20functions.20and.20other.20beasts.html#239812773">(May 21 2021 at 21:04)</a>:</h4>
<p><span class="user-mention" data-user-id="246783">@Miguel Raz Guzmán Macedo</span> do note that Libre-SOC is funding development of vector-math, if you do implement something we need, you can get paid by NLnet, who is funding Libre-SOC</p>



<a name="239813085"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Raz%20takes%20on%20the%20trig%20functions%20and%20other%20beasts/near/239813085" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Miguel Raz Guzmán Macedo <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Raz.20takes.20on.20the.20trig.20functions.20and.20other.20beasts.html#239813085">(May 21 2021 at 21:07)</a>:</h4>
<p>@jubilee The kernels don't branch, but the handlers do:</p>



<a name="239813107"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Raz%20takes%20on%20the%20trig%20functions%20and%20other%20beasts/near/239813107" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Miguel Raz Guzmán Macedo <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Raz.20takes.20on.20the.20trig.20functions.20and.20other.20beasts.html#239813107">(May 21 2021 at 21:08)</a>:</h4>
<p><a href="https://github.com/JuliaLang/julia/blob/b1a4129338113181f01754371633d67bd8d17760/base/special/trig.jl#L69">https://github.com/JuliaLang/julia/blob/b1a4129338113181f01754371633d67bd8d17760/base/special/trig.jl#L69</a></p>



<a name="239813149"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Raz%20takes%20on%20the%20trig%20functions%20and%20other%20beasts/near/239813149" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jacob Lifshay <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Raz.20takes.20on.20the.20trig.20functions.20and.20other.20beasts.html#239813149">(May 21 2021 at 21:08)</a>:</h4>
<p><span class="user-mention silent" data-user-id="281757">Jubilee</span> <a href="#narrow/stream/257879-project-portable-simd/topic/Raz.20takes.20on.20the.20trig.20functions.20and.20other.20beasts/near/239812715">said</a>:</p>
<blockquote>
<p>There <em>is</em> a more fundamental issue at hand: SIMD functions cannot branch, otherwise you cannot do it in parallel, and I do not know if Julia's impementation uses <code>if</code> and the like.</p>
</blockquote>
<p>yup, that's what I was referring to when I mentioned <code>match</code> above. There is <code>select</code>, which is like <code>if cond { a } else { b }</code> except that both the true and false branches are always executed, just the final result is selected.</p>



<a name="239813402"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Raz%20takes%20on%20the%20trig%20functions%20and%20other%20beasts/near/239813402" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jacob Lifshay <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Raz.20takes.20on.20the.20trig.20functions.20and.20other.20beasts.html#239813402">(May 21 2021 at 21:10)</a>:</h4>
<p>one of the other things that <code>sin</code> is blocked on is gather-load support, for loading the right part of a giant approximation to <code>2/pi</code></p>



<a name="239813485"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Raz%20takes%20on%20the%20trig%20functions%20and%20other%20beasts/near/239813485" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jacob Lifshay <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Raz.20takes.20on.20the.20trig.20functions.20and.20other.20beasts.html#239813485">(May 21 2021 at 21:11)</a>:</h4>
<p>(or whatever pi-related constant is needed for argument reduction)</p>



<a name="239813507"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Raz%20takes%20on%20the%20trig%20functions%20and%20other%20beasts/near/239813507" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Caleb Zulawski <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Raz.20takes.20on.20the.20trig.20functions.20and.20other.20beasts.html#239813507">(May 21 2021 at 21:11)</a>:</h4>
<p>I've been pretty busy lately but maybe I'll prioritize scatter gather next?  Unless <span class="user-mention" data-user-id="281757">@Jubilee</span> was planning on handling that</p>



<a name="239813643"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Raz%20takes%20on%20the%20trig%20functions%20and%20other%20beasts/near/239813643" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Miguel Raz Guzmán Macedo <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Raz.20takes.20on.20the.20trig.20functions.20and.20other.20beasts.html#239813643">(May 21 2021 at 21:12)</a>:</h4>
<p>Also, to all reading this:<br>
I suggested taking on <code>simd_fcos</code> because I thought it was another good "getting my feet wet" contribution, but if anyone else has a good suggestion on what else I can attempt that is welcome too.</p>



<a name="239813729"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Raz%20takes%20on%20the%20trig%20functions%20and%20other%20beasts/near/239813729" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jacob Lifshay <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Raz.20takes.20on.20the.20trig.20functions.20and.20other.20beasts.html#239813729">(May 21 2021 at 21:13)</a>:</h4>
<p>some functions that shouldn't be blocked on anything that are needed are <code>log2</code> and <code>exp2</code> and friends, as well as cube root.</p>



<a name="239814025"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Raz%20takes%20on%20the%20trig%20functions%20and%20other%20beasts/near/239814025" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jacob Lifshay <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Raz.20takes.20on.20the.20trig.20functions.20and.20other.20beasts.html#239814025">(May 21 2021 at 21:15)</a>:</h4>
<p>log2 should be pretty easy since you just run <code>ilogb</code> (already implemented) then add the log2 kernel for the fraction part</p>



<a name="239814328"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Raz%20takes%20on%20the%20trig%20functions%20and%20other%20beasts/near/239814328" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jacob Lifshay <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Raz.20takes.20on.20the.20trig.20functions.20and.20other.20beasts.html#239814328">(May 21 2021 at 21:18)</a>:</h4>
<p>along with a few <code>select</code> for handling special cases (inf, zero, nan, and negative inputs)</p>



<a name="239815116"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Raz%20takes%20on%20the%20trig%20functions%20and%20other%20beasts/near/239815116" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jubilee <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Raz.20takes.20on.20the.20trig.20functions.20and.20other.20beasts.html#239815116">(May 21 2021 at 21:27)</a>:</h4>
<p><span class="user-mention silent" data-user-id="229517">Jacob Lifshay</span> <a href="#narrow/stream/257879-project-portable-simd/topic/Raz.20takes.20on.20the.20trig.20functions.20and.20other.20beasts/near/239813402">said</a>:</p>
<blockquote>
<p>one of the other things that <code>sin</code> is blocked on is gather-load support, for loading the right part of a giant approximation to <code>2/pi</code></p>
</blockquote>
<p>hrm, gathering from a static array?</p>



<a name="239815575"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Raz%20takes%20on%20the%20trig%20functions%20and%20other%20beasts/near/239815575" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jubilee <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Raz.20takes.20on.20the.20trig.20functions.20and.20other.20beasts.html#239815575">(May 21 2021 at 21:32)</a>:</h4>
<p>What's the actual sequence of loads look like?</p>



<a name="239816130"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Raz%20takes%20on%20the%20trig%20functions%20and%20other%20beasts/near/239816130" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jacob Lifshay <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Raz.20takes.20on.20the.20trig.20functions.20and.20other.20beasts.html#239816130">(May 21 2021 at 21:38)</a>:</h4>
<p>random access based on the exponent field of the input elements</p>



<a name="239816159"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Raz%20takes%20on%20the%20trig%20functions%20and%20other%20beasts/near/239816159" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jacob Lifshay <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Raz.20takes.20on.20the.20trig.20functions.20and.20other.20beasts.html#239816159">(May 21 2021 at 21:39)</a>:</h4>
<p>for f64 there's something like 4kiB of tables</p>



<a name="239818150"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Raz%20takes%20on%20the%20trig%20functions%20and%20other%20beasts/near/239818150" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jubilee <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Raz.20takes.20on.20the.20trig.20functions.20and.20other.20beasts.html#239818150">(May 21 2021 at 22:01)</a>:</h4>
<p>Aha.</p>



<a name="239818364"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Raz%20takes%20on%20the%20trig%20functions%20and%20other%20beasts/near/239818364" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jubilee <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Raz.20takes.20on.20the.20trig.20functions.20and.20other.20beasts.html#239818364">(May 21 2021 at 22:03)</a>:</h4>
<p>so you manipulate the vector to reduce the inputs to their exponents and then, after doing some manipulation, gather using that vector from the table.</p>



<a name="239819199"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Raz%20takes%20on%20the%20trig%20functions%20and%20other%20beasts/near/239819199" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Thom Chiovoloni <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Raz.20takes.20on.20the.20trig.20functions.20and.20other.20beasts.html#239819199">(May 21 2021 at 22:11)</a>:</h4>
<p>i don't see the issue</p>
<div class="codehilite" data-code-language="Rust"><pre><span></span><code><span class="k">impl</span><span class="w"> </span><span class="cp">$vecf</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">    </span><span class="c1">// ...</span>
<span class="w">    </span><span class="k">pub</span><span class="w"> </span><span class="k">fn</span> <span class="nf">sin</span><span class="p">(</span><span class="bp">self</span><span class="p">)</span><span class="w"> </span>-&gt; <span class="nc">Self</span><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="bp">self</span><span class="w"> </span><span class="p">}</span><span class="w"></span>
<span class="w">    </span><span class="c1">// ...</span>
<span class="p">}</span><span class="w"></span>
</code></pre></div>



<a name="239819331"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Raz%20takes%20on%20the%20trig%20functions%20and%20other%20beasts/near/239819331" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Caleb Zulawski <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Raz.20takes.20on.20the.20trig.20functions.20and.20other.20beasts.html#239819331">(May 21 2021 at 22:13)</a>:</h4>
<p>Small angle approximation I see</p>



<a name="239819376"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Raz%20takes%20on%20the%20trig%20functions%20and%20other%20beasts/near/239819376" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jacob Lifshay <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Raz.20takes.20on.20the.20trig.20functions.20and.20other.20beasts.html#239819376">(May 21 2021 at 22:13)</a>:</h4>
<p>Completely accurate for all <code>NaN</code> inputs! :P</p>



<a name="239819388"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Raz%20takes%20on%20the%20trig%20functions%20and%20other%20beasts/near/239819388" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Thom Chiovoloni <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Raz.20takes.20on.20the.20trig.20functions.20and.20other.20beasts.html#239819388">(May 21 2021 at 22:13)</a>:</h4>
<p><del>sm</del>all angles</p>



<a name="239819459"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Raz%20takes%20on%20the%20trig%20functions%20and%20other%20beasts/near/239819459" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jacob Lifshay <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Raz.20takes.20on.20the.20trig.20functions.20and.20other.20beasts.html#239819459">(May 21 2021 at 22:14)</a>:</h4>
<p>Sleef's table for sin/cos/etc.: <a href="https://github.com/shibatch/sleef/blob/85440a5e87dae36ca1b891de14bc83b441ae7c43/src/libm/rempitab.c#L14">https://github.com/shibatch/sleef/blob/85440a5e87dae36ca1b891de14bc83b441ae7c43/src/libm/rempitab.c#L14</a></p>



<a name="239819520"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Raz%20takes%20on%20the%20trig%20functions%20and%20other%20beasts/near/239819520" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Caleb Zulawski <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Raz.20takes.20on.20the.20trig.20functions.20and.20other.20beasts.html#239819520">(May 21 2021 at 22:15)</a>:</h4>
<p>I assume you may be able to use const generics to build yours?</p>



<a name="239819542"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Raz%20takes%20on%20the%20trig%20functions%20and%20other%20beasts/near/239819542" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Caleb Zulawski <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Raz.20takes.20on.20the.20trig.20functions.20and.20other.20beasts.html#239819542">(May 21 2021 at 22:15)</a>:</h4>
<p>I mean const fn</p>



<a name="239819558"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Raz%20takes%20on%20the%20trig%20functions%20and%20other%20beasts/near/239819558" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jacob Lifshay <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Raz.20takes.20on.20the.20trig.20functions.20and.20other.20beasts.html#239819558">(May 21 2021 at 22:15)</a>:</h4>
<p>I'm using <code>maxima</code></p>



<a name="239819586"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Raz%20takes%20on%20the%20trig%20functions%20and%20other%20beasts/near/239819586" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jacob Lifshay <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Raz.20takes.20on.20the.20trig.20functions.20and.20other.20beasts.html#239819586">(May 21 2021 at 22:15)</a>:</h4>
<p>arbitrary-precision arithmetic FTW!</p>



<a name="239819725"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Raz%20takes%20on%20the%20trig%20functions%20and%20other%20beasts/near/239819725" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jacob Lifshay <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Raz.20takes.20on.20the.20trig.20functions.20and.20other.20beasts.html#239819725">(May 21 2021 at 22:17)</a>:</h4>
<p><a href="https://salsa.debian.org/Kazan-team/vector-math/-/blob/f2d096a09d964631f8273f2c8ca0d1fa0ddfbdfc/src/algorithms/trig_pi.rs#L10">https://salsa.debian.org/Kazan-team/vector-math/-/blob/f2d096a09d964631f8273f2c8ca0d1fa0ddfbdfc/src/algorithms/trig_pi.rs#L10</a></p>



<a name="239819930"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Raz%20takes%20on%20the%20trig%20functions%20and%20other%20beasts/near/239819930" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jacob Lifshay <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Raz.20takes.20on.20the.20trig.20functions.20and.20other.20beasts.html#239819930">(May 21 2021 at 22:19)</a>:</h4>
<p>...maxima's something like 50 years old now...</p>



<a name="239820143"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Raz%20takes%20on%20the%20trig%20functions%20and%20other%20beasts/near/239820143" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jacob Lifshay <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Raz.20takes.20on.20the.20trig.20functions.20and.20other.20beasts.html#239820143">(May 21 2021 at 22:21)</a>:</h4>
<blockquote>
<p>Maxima is a descendant of Macsyma, the legendary computer algebra system developed in the late 1960s at the Massachusetts Institute of Technology.</p>
</blockquote>



<a name="239820225"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Raz%20takes%20on%20the%20trig%20functions%20and%20other%20beasts/near/239820225" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jacob Lifshay <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Raz.20takes.20on.20the.20trig.20functions.20and.20other.20beasts.html#239820225">(May 21 2021 at 22:22)</a>:</h4>
<p>predates C!</p>



<a name="239820585"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Raz%20takes%20on%20the%20trig%20functions%20and%20other%20beasts/near/239820585" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lokathor <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Raz.20takes.20on.20the.20trig.20functions.20and.20other.20beasts.html#239820585">(May 21 2021 at 22:26)</a>:</h4>
<p>the wide crate has some implementations but you'd have to check the C they're based on (linked in a comment in the source) for notes about accuracy range and such <a href="https://docs.rs/wide/0.6.4/src/wide/f32x4_.rs.html#850">https://docs.rs/wide/0.6.4/src/wide/f32x4_.rs.html#850</a></p>



<a name="239821669"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Raz%20takes%20on%20the%20trig%20functions%20and%20other%20beasts/near/239821669" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jacob Lifshay <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Raz.20takes.20on.20the.20trig.20functions.20and.20other.20beasts.html#239821669">(May 21 2021 at 22:39)</a>:</h4>
<p>that <code>wide</code> function is only accurate for small inputs</p>



<a name="239821786"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Raz%20takes%20on%20the%20trig%20functions%20and%20other%20beasts/near/239821786" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jacob Lifshay <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Raz.20takes.20on.20the.20trig.20functions.20and.20other.20beasts.html#239821786">(May 21 2021 at 22:41)</a>:</h4>
<p>if you only care about that, sin_cos is trivial: <code>fn sin_cos(x) { sin_cos_pi(x * (1.0 / PI)) }</code></p>



<a name="239821807"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Raz%20takes%20on%20the%20trig%20functions%20and%20other%20beasts/near/239821807" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jacob Lifshay <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Raz.20takes.20on.20the.20trig.20functions.20and.20other.20beasts.html#239821807">(May 21 2021 at 22:41)</a>:</h4>
<p>since I already implemented <code>sin_cos_pi</code></p>



<a name="239821870"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Raz%20takes%20on%20the%20trig%20functions%20and%20other%20beasts/near/239821870" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jacob Lifshay <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Raz.20takes.20on.20the.20trig.20functions.20and.20other.20beasts.html#239821870">(May 21 2021 at 22:42)</a>:</h4>
<p><code>sin_cos_pi</code> is accurate for all inputs</p>



<a name="239835717"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Raz%20takes%20on%20the%20trig%20functions%20and%20other%20beasts/near/239835717" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Thom Chiovoloni <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Raz.20takes.20on.20the.20trig.20functions.20and.20other.20beasts.html#239835717">(May 22 2021 at 02:13)</a>:</h4>
<p><span class="user-mention silent" data-user-id="229517">Jacob Lifshay</span> <a href="#narrow/stream/257879-project-portable-simd/topic/Raz.20takes.20on.20the.20trig.20functions.20and.20other.20beasts/near/239819459">said</a>:</p>
<blockquote>
<p>Sleef's table for sin/cos/etc.: <a href="https://github.com/shibatch/sleef/blob/85440a5e87dae36ca1b891de14bc83b441ae7c43/src/libm/rempitab.c#L14">https://github.com/shibatch/sleef/blob/85440a5e87dae36ca1b891de14bc83b441ae7c43/src/libm/rempitab.c#L14</a></p>
</blockquote>
<p>Just looking now, hopefully we can do better than that — that's extremely poor information density (look at all the duplicated values).</p>



<a name="239835739"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Raz%20takes%20on%20the%20trig%20functions%20and%20other%20beasts/near/239835739" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jacob Lifshay <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Raz.20takes.20on.20the.20trig.20functions.20and.20other.20beasts.html#239835739">(May 22 2021 at 02:13)</a>:</h4>
<p>it's designed for speed, not for smallness...</p>



<a name="239835741"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Raz%20takes%20on%20the%20trig%20functions%20and%20other%20beasts/near/239835741" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Thom Chiovoloni <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Raz.20takes.20on.20the.20trig.20functions.20and.20other.20beasts.html#239835741">(May 22 2021 at 02:13)</a>:</h4>
<p>In general big lookup tables are not necessarily as good of a tradeoff if we expect everything to be duplicated per-binary</p>



<a name="239835810"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Raz%20takes%20on%20the%20trig%20functions%20and%20other%20beasts/near/239835810" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Thom Chiovoloni <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Raz.20takes.20on.20the.20trig.20functions.20and.20other.20beasts.html#239835810">(May 22 2021 at 02:14)</a>:</h4>
<p>these days those are often the same. with the unicode tables we've definitely seen that the tradeoff towards "smaller table" at the cost of more complex lookup function is worth it</p>



<a name="239835841"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Raz%20takes%20on%20the%20trig%20functions%20and%20other%20beasts/near/239835841" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> scottmcm <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Raz.20takes.20on.20the.20trig.20functions.20and.20other.20beasts.html#239835841">(May 22 2021 at 02:15)</a>:</h4>
<p>Yeah, bigger can look good in microbenchmarks, but in real code the one that uses up less of the cache helps.</p>



<a name="239836093"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Raz%20takes%20on%20the%20trig%20functions%20and%20other%20beasts/near/239836093" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Caleb Zulawski <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Raz.20takes.20on.20the.20trig.20functions.20and.20other.20beasts.html#239836093">(May 22 2021 at 02:19)</a>:</h4>
<p>Agreed on cache</p>



<a name="239836181"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Raz%20takes%20on%20the%20trig%20functions%20and%20other%20beasts/near/239836181" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Caleb Zulawski <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Raz.20takes.20on.20the.20trig.20functions.20and.20other.20beasts.html#239836181">(May 22 2021 at 02:20)</a>:</h4>
<p>If it's evicted from L1 cache for whatever reason it'll probably slow it down quite a bit more than the algorithm having a bit of math to use a smaller table</p>



<a name="239837149"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Raz%20takes%20on%20the%20trig%20functions%20and%20other%20beasts/near/239837149" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jacob Lifshay <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Raz.20takes.20on.20the.20trig.20functions.20and.20other.20beasts.html#239837149">(May 22 2021 at 02:38)</a>:</h4>
<p>one part that helps is the table is only really used for large inputs, and those are much less common usually</p>



<a name="239837175"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Raz%20takes%20on%20the%20trig%20functions%20and%20other%20beasts/near/239837175" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jacob Lifshay <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Raz.20takes.20on.20the.20trig.20functions.20and.20other.20beasts.html#239837175">(May 22 2021 at 02:39)</a>:</h4>
<p>kinda like using the part of the unicode table dedicated to ancient egyptian is less common</p>



<a name="239838005"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Raz%20takes%20on%20the%20trig%20functions%20and%20other%20beasts/near/239838005" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Thom Chiovoloni <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Raz.20takes.20on.20the.20trig.20functions.20and.20other.20beasts.html#239838005">(May 22 2021 at 02:55)</a>:</h4>
<p>a 30kb table in libcore for edge cases would be very unfortunate</p>



<a name="239838079"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Raz%20takes%20on%20the%20trig%20functions%20and%20other%20beasts/near/239838079" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jacob Lifshay <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Raz.20takes.20on.20the.20trig.20functions.20and.20other.20beasts.html#239838079">(May 22 2021 at 02:56)</a>:</h4>
<p>I'd expect we can shrink it some...iirc julia uses something like 1kbit (128 bytes)</p>



<a name="239838962"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Raz%20takes%20on%20the%20trig%20functions%20and%20other%20beasts/near/239838962" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jubilee <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Raz.20takes.20on.20the.20trig.20functions.20and.20other.20beasts.html#239838962">(May 22 2021 at 03:09)</a>:</h4>
<p>Yeaaaah it really needs to be within a couple kb, we can't use up basically all of people's L1 cache for a table. <span aria-label="sweat smile" class="emoji emoji-1f605" role="img" title="sweat smile">:sweat_smile:</span></p>



<a name="239842995"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Raz%20takes%20on%20the%20trig%20functions%20and%20other%20beasts/near/239842995" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lokathor <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Raz.20takes.20on.20the.20trig.20functions.20and.20other.20beasts.html#239842995">(May 22 2021 at 04:27)</a>:</h4>
<p>but 128 bytes would be within reason. That's basically two Mat4 values. And people dont <em>have</em> to use our sin/cos function after all.</p>



<a name="239845198"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Raz%20takes%20on%20the%20trig%20functions%20and%20other%20beasts/near/239845198" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jubilee <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Raz.20takes.20on.20the.20trig.20functions.20and.20other.20beasts.html#239845198">(May 22 2021 at 05:06)</a>:</h4>
<p>yeah, 128 bytes is fine. Even 256 or 512 would be worth considering.</p>



<a name="239845575"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Raz%20takes%20on%20the%20trig%20functions%20and%20other%20beasts/near/239845575" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Thom Chiovoloni <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Raz.20takes.20on.20the.20trig.20functions.20and.20other.20beasts.html#239845575">(May 22 2021 at 05:13)</a>:</h4>
<p>oh yeah 128 bytes is definely fine</p>



<a name="239845614"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Raz%20takes%20on%20the%20trig%20functions%20and%20other%20beasts/near/239845614" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Thom Chiovoloni <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Raz.20takes.20on.20the.20trig.20functions.20and.20other.20beasts.html#239845614">(May 22 2021 at 05:14)</a>:</h4>
<p>even 1 or 2k would be fine</p>



<a name="239845628"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Raz%20takes%20on%20the%20trig%20functions%20and%20other%20beasts/near/239845628" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Thom Chiovoloni <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Raz.20takes.20on.20the.20trig.20functions.20and.20other.20beasts.html#239845628">(May 22 2021 at 05:14)</a>:</h4>
<p>30... not so much</p>



<a name="239850139"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Raz%20takes%20on%20the%20trig%20functions%20and%20other%20beasts/near/239850139" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> scottmcm <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Raz.20takes.20on.20the.20trig.20functions.20and.20other.20beasts.html#239850139">(May 22 2021 at 06:36)</a>:</h4>
<p>I wonder if we could get away with just saying that once 1ULP in the input is ≥π, that SIMD no longer guarantees accurate answers with it.  Because I really don't see how anyone can care at that point anyway...</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>